Input
FormsA text input field for capturing user input. Supports labels, placeholders, error states, and various HTML input types.
Import
import { Input } from "@/components/ui/input";Usage
Basic Input
Standard text input with label
With Validation
Input showing error state
Input Types
Different HTML input types
Disabled
Input in disabled state
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label text displayed above the input |
placeholder | string | — | Placeholder text shown when empty |
error | string | — | Error message to display below the input |
disabled | boolean | false | Whether the input is disabled |
type | string | "text" | HTML input type (text, email, password, etc.) |