Input
Inputs components for different use case.
Input - Basic
Installation
npm installUsage
import { Input } from "@/components/ui/input";
export function MyComponent() {
return (
<div className="grid w-full max-w-sm items-center gap-1.5">
<label htmlFor="email">Email</label>
<Input type="email" id="email" placeholder="Email" />
</div>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | string | "text" | Input type (text, email, password, etc.) |
placeholder | string | - | Placeholder text |
className | string | - | Additional CSS classes |
disabled | boolean | false | Whether the input is disabled |
value | string | - | Input value |
onChange | function | - | Change handler |
Dependencies
This component has no external dependencies.
Input - Tags selector
Input - File Upload
Drag and drop or click to upload
Input - Number
0100
Input - Password
8+ characters
Number
Lowercase
Uppercase
Special (!@#$)
Input - OTP Input
Input - Color Picker
Opacity100%
Swatches