Input
Displays a form input field or a component that looks like an input field.
input
Login to view codeCreate a free account to access component source code
Installation
Login to view commandCreate a free account to access the install command
Usage
import { Input } from "@/components/ui/input"<Input />
API Reference
Input
Styled wrapper around the native input element. All standard HTML input attributes are forwarded.
| Prop | Type | Default | Description |
|---|---|---|---|
type | "text" | "email" | "password" | ... | "text" | Passed to the native input type attribute |
className | string | - | Additional classes merged with the default input styles |
Examples
For accessible labelling and validation, prefer using the Label component to wrap inputs, or the Form component. See some related examples.
Small Size
Login to view codeCreate a free account to access component source code
Large Size
Login to view codeCreate a free account to access component source code