Input
StableSingle-line text field with optional prefix and suffix. Give it a label prop for a complete field, or place it inside a Field.
Dot-separated path, lowercase.
Dot-separated path, lowercase.
When to use
Use it for
- Short free text: a name, a URL, a search query, a value with a unit.
- prefix for an icon or a currency, suffix for a unit or a keyboard hint.
- size follows density: sm in toolbars and filters, md in forms, lg only on sparse screens.
Not for
- More than one line: use Textarea.
- Numbers with steps, min and max: use NumberField (increment buttons, arrow keys, locale formatting).
- Choosing from a known list: Select for under about ten options, Combobox for long or searchable lists.
Do and don't
Every example is rendered with the real component, so it always matches what ships.
Dot-separated path, lowercase.
Label above, format help in the hint
The label stays visible while typing; the hint answers the question before it is asked.
Units in the suffix
The value stays a number the user can edit; the unit is context, not content.
Clearing the value on error
Keep what the user typed and say how to fix it.
Accessibility
- Base UI Input: inherits label, description and error wiring from the surrounding Field.
- The field edge (color.border.strong) has at least 3:1 contrast with the surface in both themes (WCAG 1.4.11).
- Focus shows a 2px signal-colored edge on every focus, since users type into it.
- On touch screens the text is 17px so iOS does not zoom the page on focus.
- A prefix icon is decorative; if the prefix carries meaning (a currency), make it text.
Anatomy and tokens
Read from packages/react/src/components/Input/Input.module.css at build time. Every value is a token: open one to see its
alias chain in both themes.
- Bordered box (holds prefix, input and suffix)
.control - Size sm
.sm - Size lg
.lg - Bordered box (holds prefix, input and suffix), hover
@media (hover: hover) .control:hover:not(:has(input[data-disabled], input[data-invalid], input[aria-invalid="true"])) - Bordered box (holds prefix, input and suffix)
.control:focus-within - Bordered box (holds prefix, input and suffix)
.control:has(input[data-invalid]), .control:has(input[aria-invalid="true"]) - Bordered box (holds prefix, input and suffix)
.control:has(input[data-invalid]):focus-within, .control:has(input[aria-invalid="true"]):focus-within - Bordered box (holds prefix, input and suffix)
.control:has(input[data-disabled]) - Bordered box (holds prefix, input and suffix)
.control:has(input[readonly]) - Native input
.input - Native input, placeholder
.input::placeholder - Prefix or suffix
.affix - Bordered box (holds prefix, input and suffix)
@media (pointer: coarse) .control
Props
Parsed from the TypeScript types in packages/react/src/components/Input/Input.tsx, so this table cannot drift from the
code.
It also accepts every native <input> attribute except size, prefix.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | none | Visible label. When set, the Input wraps itself in a Field (label, hint, error wired for you). Leave it unset when the Input is already inside a Field. |
hint | ReactNode | none | Helper text under the label (Field description). |
error | ReactNode | none | Error message. Marks the input invalid and announces the message. |
prefix | ReactNode | none | Content before the value: an Icon, a currency symbol, a unit. Decorative unless it is text. |
suffix | ReactNode | none | Content after the value: a unit, a Kbd hint, a clear IconButton. |
size | 'sm' | 'md' | 'lg' | 'md' | Height follows the density tokens. Default `md`. |
hideLabel | boolean | none | Visually hide the Field label (still the accessible name). Only with `label`. |
onValueChange | (value: string) => void | none | Called with the new string value on every change. |
Playground
Change the props and see the real Input update. Controls are generated from the TypeScript props; nothing here changes the system.
Dot-separated path, lowercase.
<Input
label="Token name"
placeholder="color.action.primary.bg"
hint="Dot-separated path, lowercase."
/>Workbench
For contributors: every state with the accessibility panel, in the component workbench (Storybook). The stories double as visual test fixtures; the guidance on this page is the user documentation (open Input in Storybook) .
Embed Storybook stories here (6)
Loads from https://bridge-storybook.floriangouloubi.com (set STORYBOOK_URL at build time). If Storybook is not running, the frames stay
empty.
Default
WithError
Required
PrefixAndSuffix
Search_
AllStates
Changelog
- New
Forms: Field (label, description, error wired by Base UI Field) and Input rebuilt on it (prefix, suffix, sizes; label, hint and error props kept). New Textarea (autosize, character count), Select (groups, descriptions), Combobox (filtering, async loading and empty states, multiple with chips), Checkbox (indeterminate, parent), CheckboxGroup, RadioGroup, Switch, Slider (single and range), NumberField (steppers, units) and Form (server errors with a focusable error summary, FormActions footer).
Unreleased (current version 0.1.0, no release tagged yet) , Oct 17, 2026
- New
Bridge token system v1. Adds a brand mapping layer (`bridge` default, `ocean` alternate) between primitives and semantic tokens, a component tier (button, input, checkbox, switch, slider, card, popup, dialog, tooltip, toast, table, tabs, progress, nav), comfortable and compact density, motion durations and easings with a reduced-motion override, layers (z-index), icon sizes, breakpoints, a 1.2 type scale from 14px with tracking tokens, and self-hosted IBM Plex Sans and Mono (`@bridge-ds/tokens/fonts.css`). Primitives are regenerated in OKLCH on one lightness ladder. The build now writes `dist/resolved.json` and fails when any pair in `contrast.checks.json` drops below its WCAG minimum in any brand and theme. Fixes `color.border.strong` against `color.surface.default` (now at least 3:1 in both themes).
Unreleased (current version 0.1.0, no release tagged yet) , Oct 17, 2026
- Fix
Add usage guidance files for Button, Input, Badge and Card, plus the list of color pairs to check for contrast. They feed the new documentation site; no visual or API change.
Unreleased (current version 0.1.0, no release tagged yet) , Oct 17, 2026
- New
Initial foundation: DTCG 2025.10 primitives and light/dark semantic tokens built to CSS variables, plus Button, Input, Badge and Card consuming tokens only.
Unreleased (current version 0.1.0, no release tagged yet) , Oct 17, 2026