Command Palette

Search for a command to run...

Input

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

Installation

pnpm dlx shadcn@latest add https://dga-registry.vercel.app/r/input.json

Basic States

Default, disabled, invalid, and read-only states.

Input Types

Different HTML input types supported.

Input with Icons

Examples of inputs styled with icons using wrapper divs.

Form Examples

Real-world form scenarios using the Input component.

Login Form

Registration Form

Input Sizing

Inputs with different width constraints.

File Upload

File input with custom styling.

Advanced Patterns

Complex input patterns and combinations.

https://
SAR

Props

PropTypeDefaultDescription
typestring"text"HTML input type
placeholderstringPlaceholder text
disabledbooleanfalseDisables the input
readOnlybooleanfalseMakes input read-only
aria-invalidstringMarks input as invalid
classNamestringAdditional CSS classes