Input

Form

Collects short, single-line text from the user.

npx shadcn@latest add input

Default

Preview
Live
tsx
1<Input type="email" placeholder="you@company.com" />
2<Input placeholder="Search…" />

States

Disabled inputs are non-interactive and dimmed; invalid ones get a destructive ring.

Preview
Live
tsx
1<Input placeholder="Disabled input" disabled />
2<Input placeholder="Invalid value" aria-invalid />

API reference

All props of the underlying Base UI primitive are forwarded. The table below documents the Shelf-specific props.

PropTypeDescription
typestring= "text"The input type attribute.