Forms
Input
Single-line text field, with icons and addons.
Usage
A native <input> with calm borders, a soft focus ring and a subtle filled background in dark mode. Pair it with a Field and Label; on its own, give it an aria-label.
Default. Hover, then focus to see the ring.
Use letters, numbers and hyphens only.
Read only. Focusable and selectable.
When to use
- Short, single-line text: names, emails, URLs, numbers, search.
- With icons, a prefix or a suffix — use
InputGroup. - Secrets that users may want to check — use
PasswordInput.
Not for: long or multi-line text (use a textarea), picking from a fixed list (use a select), dates and times without a picker.
Sizes
32, 36 and 44px tall. Use lg for the main field on a touch-first screen. On touch devices the text is 16px so iOS Safari does not zoom the page on focus.
Icons, addons and actions
InputGroup draws one border around the input and its neighbours. InputIcon is decorative, InputAddon is attached text such as https:// or USD, and InputAction is an icon button inside the field. Clicking any non-interactive part of the group focuses the input. Set the size on the group.
Password
PasswordInput is an input plus a reveal button. The button has a constant label and aria-pressed, and swaps the eye and eye-off icons.
The eye button reveals what you typed.
API
Input
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'sm' | 'md' | 'lg' | 'md' | Height 32 / 36 / 44px. |
| ...props | InputHTMLAttributes | — | Forwarded to <input>, including ref, type, value, defaultValue, disabled, readOnly. |
InputGroup and parts
| Prop | Type | Default | Description |
|---|---|---|---|
| InputGroup size | 'sm' | 'md' | 'lg' | 'md' | Height of the whole group. |
| InputIcon | span | — | Decorative icon (aria-hidden), before or after the input. |
| InputAddon | span | — | Attached text at either edge, with a divider. |
| InputAction | button | — | Icon button inside the field. Needs an aria-label. type defaults to "button". |
PasswordInput
| Prop | Type | Default | Description |
|---|---|---|---|
| visible / defaultVisible | boolean | false | Controlled / initial visibility. |
| onVisibleChange | (visible: boolean) => void | — | Called when the toggle is pressed. |
| toggleLabel | string | 'Show password' | Accessible name of the reveal button. |
| ...props | InputProps (without type) | — | Forwarded to the input. |
In plain HTML: ui-input, ui-input-sm, ui-input-lg, and ui-input-group with ui-input-icon, ui-input-addon, ui-input-action.
Keyboard
| Key | Action |
|---|---|
| Tab | Moves into and out of the field, and to the action button. |
| Enter / Space | On an action button, activates it (for example, reveals the password). |
Accessibility
- A native input, so text entry, autofill, spellcheck and mobile keyboards behave as expected.
- Inside a Field the id, aria-describedby, aria-invalid and required are wired automatically.
- The invalid state is a destructive border plus the error message, not colour alone.
- The reveal button has a fixed accessible name and aria-pressed; icons are aria-hidden.
- Disabled inputs are dimmed; read-only inputs stay focusable and show a muted fill.
Motion
- Border, ring and background transition over 150ms with the standard ease.
- Action buttons press to .94 on the snappy spring.
- Hover tints apply only on devices with a fine pointer. Reduced motion keeps the colour change.