Components
Input
Single-line text field built on React Aria for full accessibility. Sizes and demo sections are driven from config/design-system.config.ts.
Contextual config
Input sections
Show or hide documentation sections on this page. Changes apply immediately and persist across the site.
Component Playground
Live instance - the controls read their options from the same config that drives the Variants section below.
mdControls
Size
Label
Placeholder
Hint
Default
Label, placeholder, and hint text - the anatomy of a complete input field.
Default
States
All states: default, focused (click into it), disabled, error with hint text, and required.
Default / disabled / error / required
With icons
Pass any @untitledui/icons component as the icon prop to add a leading icon.
Leading icon
Password
Pass type="password" and a built-in show/hide toggle appears automatically - no extra prop needed.
Password
With tooltip
Use the tooltip prop to show a help tooltip on the trailing icon.
Tooltip
With shortcut
Use the shortcut prop to display a keyboard shortcut hint inside the field.
Shortcut
Sizes
Size affects padding, font-size, and icon sizing.
Small / Medium / Large
Input group
Attach prefix text or addon elements (dropdowns, buttons) to create compound inputs.
Prefix / leading addon
Date input
A segmented date field - each part (day/month/year) is independently focusable and typeable, built on React Aria's DateField.
Date field
Number input
Increment/decrement controls in two layouts: stacked vertical (default) or split horizontal.
Vertical / horizontal
Payment input
Auto-formats digits into groups of four and swaps the leading icon to match the detected card network (Visa, Mastercard, Amex, Discover, UnionPay).
Card number
Tag input
Type and press Enter to add a tag; Backspace on an empty field to focus the last tag. Two layouts: tags inline with the field, or in a separate row beneath it.
Inline / outer
File upload
Combines an InputGroup read-only field with a trailing Upload button that opens the native file picker.
File picker
PIN input
One-time-passcode style entry - each digit is its own slot, auto-advancing focus as the user types.
4-digit code
API
| Prop | Type | Default |
|---|---|---|
label | string | - |
hint | ReactNode | - |
placeholder | string | - |
size | "sm" | "md" | "lg" | "md" |
icon | ComponentType | - |
tooltip | string | - |
shortcut | string | boolean | false |
isInvalid | boolean | false |
isDisabled | boolean | false |
isRequired | boolean | false |
hideRequiredIndicator | boolean | false |
onClear | () => void | - |
clearLabel | string | "Clear" |
type | HTMLInputTypeAttribute | "text" |
Token anatomy
The visual decisions Untitled UI encodes into the input. All values come from DEW tokens in globals.css.
| State | Ring token | Value |
|---|---|---|
| Default | ring-primary | gray-300 (#D2D0CE) |
| Focused | ring-brand | brand-500 (#2A667C) |
| Error | ring-error_subtle | error-300 (#FDA29B) |
| Error + focused | ring-error | error-500 (#F04438) |
| Disabled | ring-primary + opacity-50 | same, dimmed |
Usage
import { Input } from "@/components/base/input/input";
<Input
label="Email address"
placeholder="olivia@untitledui.com"
hint="This is a hint text to help user."
/>Figma
No linked Figma file yet - this component was pulled in via the Untitled UI CLI, not designed in Figma first.