The Input component displays a form input field.
Preview
Usage
Installation
$ npx shadcn@latest add https://spark-ui-olive.vercel.app/r/input.json
Basic Example
import { Input } from "@/components/input";
export default function App() {
return <Input type="text" placeholder="Name" />;
}
Properties
The Input accepts all standard HTML input attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
type | string | "text" | The HTML input type. |
placeholder | string | — | Placeholder text displayed when the input is empty. |
className | string | — | Additional CSS classes for the input element. |