Skip to content
Primitives

Input

Themed text input with a focus ring; pairs with Label.

Motionnone — focus handled by CSS ring

Install

Install Kineto and follow the theme setup once in your app.

bash
npm install kineto
tsx
import { Input } from "kineto/input";

Preview

We'll never share your email.

tsx
import * as React from "react";

import { cn } from "@/lib/cn";

export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;

const Input = React.forwardRef<HTMLInputElement, InputProps>(
  ({ className, type = "text", ...props }, ref) => (
    <input
      ref={ref}
      type={type}
      className={cn(
        "flex h-10 w-full rounded-lg border border-input bg-card px-3.5 py-2 text-sm text-foreground shadow-xs transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium",
        className
      )}
      {...props}
    />
  )
);
Input.displayName = "Input";

export { Input };

src/components/ui/input.tsx

Props

PropTypeDefaultDescription
...propsInputHTMLAttributes—All native input attributes are forwarded.