Input
A precision-built text field — hairline chrome with an inner top-light, soft focus halo, autofill-safe backgrounds, and first-class file, search, number, date, and password refinements.
Installation#
pnpm dlx shadcn@latest add @davinciui/inputUsage#
Basic#
Field#
Field Group#
Variants#
Sizes#
Search#
Password#
Clearable#
Loading#
Types#
Disabled#
Invalid#
File#
Inline#
Grid#
Required#
Badge#
Input Group#
Button Group#
Form#
RTL#
API Reference#
| Prop | Type | Default |
|---|---|---|
typeNative input type — email, search, password, file, number, and date are refined out of the box. | string | "text" |
variantVisual treatment for toolbars, quiet surfaces, and minimal forms. | "default" | "filled" | "ghost" | "underline" | "default" |
sizeHeight / density. Numbers map to the native size attribute. | "sm" | "default" | "lg" | number | "default" |
invalidShorthand for aria-invalid — paints the error ring and tint. | boolean | false |
disabledDisables the input with a muted, non-interactive frame. | boolean | false |
requiredMarks as required. | boolean | false |
placeholderPlaceholder text — softens further on focus. | string | — |
inputClassNameExtra classes for the inner <input> (e.g. pe-9 for trailing overlays). | string | — |
unstyledStrips frame chrome for composing custom fields. | boolean | false |
nativeInputRenders a native <input> instead of the Base UI primitive. | boolean | false |
classNameAdditional CSS classes for the frame. | string | — |
Accessibility#
Uses a native input or Base UI input primitive, so browser semantics, keyboard editing, and focus behavior apply. aria-invalid is set from the invalid prop, and the wrapper paints a focus-visible ring; consumers must associate a label.
Motion#
Border color, background, and focus halo transition over 150ms with ease-out; the caret and text do not animate. motion-reduce:transition-none disables the frame transition when the OS prefers reduced motion.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

