Input

A styled text input field that wraps Base UI's Input primitive, supporting all native HTML input attributes with consistent focus, disabled, and validation states.

Default
Disabled

Username cannot be changed after signup.

Contact support to update your email address.

Read-only — copy and store this token securely.

Error

Please enter a valid email address.

Password must be at least 8 characters.

File Upload

PDF or Word, up to 10 MB.

Input Types
With Adornment
https://
$USD
GB
With Button
With Icon
With Label

Installation

npx shadcn@latest add @byronwade/input

Props

PropTypeDefaultDescription
typeReact.HTMLInputTypeAttribute"text"The type of the input element (e.g. "text", "email", "password").
classNamestringAdditional CSS classes merged onto the input element.
placeholderstringPlaceholder text shown when the input is empty.
disabledbooleanfalseDisables the input, preventing interaction and applying reduced-opacity styling.
aria-invalidboolean | "true" | "false"Marks the input as invalid, applying destructive border and ring styles.
valuestring | number | readonly string[]Controlled value of the input.
onChangeReact.ChangeEventHandler<HTMLInputElement>Change event handler called when the input value changes.