Loading...
Loading...
> A basic text input field for forms and data entry.
1import { Input } from "@/components/ui/input"
1<Input placeholder="Enter your email..." />
1<Input placeholder="Type here..." />
1<div className="grid gap-2">2 <Label htmlFor="email">[EMAIL]:</Label>3 <Input id="email" type="email" placeholder="m@example.com" />4</div>
1<Input disabled placeholder="Disabled input" />
1<Input error placeholder="Invalid input" />
1<Input success placeholder="Valid input" defaultValue="john@example.com" />
1<Input loading placeholder="Loading..." />
1<Input type="file" />
| Prop | Type | Default | Description |
|---|---|---|---|
| error | boolean | false | Show error styling with red border. |
| success | boolean | false | Show success styling with green ring on focus. |
| loading | boolean | false | Show loading spinner and disable input. |
| loadingText | string | - | Screen reader text for loading state. |
| disabled | boolean | false | Disable the input. |
| type | string | "text" | HTML input type (text, email, password, etc.). |
✓ Use Input when:
✗ Don't use when:
State Usage: