Input
Displays a form input field or a component that looks like an input field.
Installation
pnpm dlx shadcn@latest add https://dga-registry.vercel.app/r/input.jsonBasic States
Default, disabled, invalid, and read-only states.
Input Types
Different HTML input types supported.
Input with Icons
Examples of inputs styled with icons using wrapper divs.
Form Examples
Real-world form scenarios using the Input component.
Login Form
Registration Form
Input Sizing
Inputs with different width constraints.
File Upload
File input with custom styling.
Advanced Patterns
Complex input patterns and combinations.
https://
SAR
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | string | "text" | HTML input type |
placeholder | string | — | Placeholder text |
disabled | boolean | false | Disables the input |
readOnly | boolean | false | Makes input read-only |
aria-invalid | string | — | Marks input as invalid |
className | string | — | Additional CSS classes |