Input
Displays a form input field or a component that looks like an input field.
Installation
$ npx shadcn@latest add "/r/input.json"
Usage
With Label
Disabled State
With Placeholder
File Input
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "sm" | "md" | "lg" | "md" | The size of the input field. |
| error | boolean | false | Whether the input is in an error state, applying a destructive shadow. |
| disabled | boolean | false | Whether the input is disabled. |