Input

Installation

$npx shadcn-macos@latest add input

Examples

Props

<Input />
PropTypeDefaultDescription
typestring"text"HTML input element type (e.g. text, password, email, number, search).
placeholderstring—Placeholder text rendered when the field is empty.
valuestring—Controlled string value of the input.
defaultValuestring—Initial uncontrolled value of the input.
disabledbooleanfalseDisables interaction and dims the field.
onChange(event: React.ChangeEvent<HTMLInputElement>) => void—Callback fired whenever the input text changes.
classNamestring—Additional CSS classes.