
Styled text input with variants for email, password, and more.
npx shadcn@latest add https://ui.edbn.me/r/input.jsonA text input control. Renders an input element.
defaultValuestringInitial input value
valuestringControlled input value
onValueChangefunctionCalled when value changes
disabledbooleanfalseDisable input
readOnlybooleanfalseRead-only state
requiredbooleanfalseRequired field
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
| Attribute | Description |
|---|---|
| data-disabled | Present when input is disabled |
| data-readonly | Present when input is read-only |
| data-required | Present when input is required |
| data-valid | Present in valid state |
| data-invalid | Present in invalid state |
| data-dirty | Present when value has changed |
| data-touched | Present when input has been touched |