Input

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

Installation

$ npx shadcn@latest add "/r/input.json"

Usage

With Label

Disabled State

With Placeholder

File Input

Props

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"The size of the input field.
errorbooleanfalseWhether the input is in an error state, applying a destructive shadow.
disabledbooleanfalseWhether the input is disabled.