Input
v0.17.344 px text field with 16 px text so iOS does not zoom; aria-invalid turns the edge danger.
Input states
Install
npx shadcn add @syncrobotic/input Also installs: @syncrobotic/cn
Overview
A single-line text field, 44 px high with 16 px text so phones do not zoom in.
When to use
- Names, IDs, addresses, short free text.
- Inside a Field for its label, hint and error.
Use something else
- A number with a range or unit: Number field.
- An icon, unit or button inside the edge: Input group.
- Several lines: Textarea.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Input group search
Input group password
Input group unit
Input error on blur
Input error
Input group with button
Usage rules
- Wrap it in Field for the label, hint and error.
- Text is 16 px so iOS does not zoom on focus.
- Disabled is a grey field with readable text, not a faded one, and the hint says why it cannot be changed.
- An error is a state change: the edge turns danger and 2 px at --motion-fast, the message appears with an icon in the hint's place. Never shake; on submit, move focus to the first field in error.
Changelog
- 0.17.32026-11-19Disabled: the field keeps its grey fill with a --border edge, so in dark mode it no longer looks enabled; its words use the new --disabled (3:1 on every surface).
- 0.10.02026-11-18Disabled keeps its words readable: a grey field (bg-muted, muted text) on controls with a surface, solid disabled ink on items and icons; no more 50 % opacity, which washes text out in sunlight.
- 0.7.02026-11-17Error edge is 2 px, transitions at --motion-fast; no shake.