Input

Displays a form input field or a component that looks like an input field.

input

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.

PropTypeDefaultDescription
type"text" | "email" | "password" | ..."text"Passed to the native input type attribute
classNamestring-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

Large Size