form
A single-line text input. Put it inside a Field for the label and errors.
npx blankui add inputShown on your profile.
import { Input } from "@/components/ui/input"
<Field label="Email" error={errors.email}>
<Input type="email" placeholder="you@example.com" />
</Field>
Sizes: sm, default, lg. All native input props work (type, name, value, onChange, placeholder, disabled).
An input without a visible label, like a toolbar search box, needs an aria-label:
<Input type="search" aria-label="Search projects" placeholder="Search" />
| Avoid | Instead |
|---|---|
| <input className=...> (a raw input element) | <Input> |
| <Input> without a Field or aria-label | <Field label="Email"><Input type="email" /></Field> |
| <Input className="border-red-500"> to show an error | <Field label="Email" error="Enter a valid email"> |
Install with the shadcn CLI: npx shadcn add https://blank.vageshwar.dev/r/input.json