Input

A text input for forms and data entry. Height h-8, built-in focus and invalid styles. For icons or buttons inside the control, see Input Group.

Basic

A simple text input. Pass native type, placeholder, and events.

Installation

CLI
npx @sonojs/ui@latest add input

Usage

input.tsx
import { Input } from "@/components/ui/input"

export function Example() {
  return <Input type="email" placeholder="Email" />
}

Props

PropTypeDefaultDescription
typeHTML input type"text"Native input type — text, email, file, password, …
disabledbooleanfalseDisables the input and shows not-allowed cursor.
aria-invalidboolean—Marks the control invalid and applies destructive ring.
classNamestring—Merge extra Tailwind classes on the input.