React form controls

Inputs, selects, checkboxes, radios and segmented controls.

The layer between a CSS input style and a whole form: real components with props, states and keyboard behaviour, but small enough to compose. A block answers "what goes in this part of the page"; a control answers "what goes in this part of the form", and that is the gap most catalogs skip straight over.

12 matching12 primitivesFree to copy
Open the full page for this primitive

Field

The label, hint, error and aria wiring around one input — including the part that is usually wrong, where the hint has to stay in aria-describedby once an error joins it.

Form Controls129 lines1 dep
Open the full page for this primitive

Input Group

An input with addons, an inline icon or an action button attached, with the padding reserved for the icon and the focus ring on the whole group rather than its middle third.

Form Controls120 linesNo deps
Open the full page for this primitive

Combobox

A select you can type into, with the full ARIA combobox keyboard contract and focus that never leaves the input — which is the single most common defect in hand-built ones.

Selection235 lines1 dep
Open the full page for this primitive

Segmented Control

Pick exactly one, built as a radio group rather than three buttons, so a screen reader says which is chosen — with a sliding indicator that animates one transform instead of repainting backgrounds.

Selection164 linesNo deps
Open the full page for this primitive

Radio Card Group

Plans and shipping methods as cards, built on real radio inputs so the arrow keys, "2 of 3" and form submission are the browser's — with selection drawn as a tick, not only a colour.

Selection135 linesNo deps
Open the full page for this primitive

Keyboard Key

A shortcut written once as "mod+k" and rendered for the keyboard it will be typed on — ⌘ on Apple, Ctrl elsewhere — with the symbols hidden from screen readers behind a spoken name.

Form Controls149 linesNo deps
Open the full page for this primitive

Switch

An on/off setting that takes effect now, as role="switch" so a screen reader says "on" rather than "checked" — with the label and description in one row, a clickable label, and an off state dark enough to pass 3:1.

Form Controls106 linesNo deps
Open the full page for this primitive

Range Slider

Two thumbs on one track, built from two native range inputs so the keyboard, touch dragging and announced values come free — with the thumbs prevented from crossing and the min thumb still reachable at the far end.

Form Controls129 linesNo deps
Open the full page for this primitive

Rating

Both ratings, which are different components: a radio group for choosing whole stars, and a non-interactive display with fractional fill, because an average of 4.3 drawn as 4.5 is a number the page invented.

Selection158 lines1 dep
Open the full page for this primitive

Emoji Reactions

A reaction row where each pill is a toggle that says whether you are one of the count, plus a short picker — announced with names, since "👍 3" is read as a shrug by a screen reader.

Selection153 lines1 dep

Questions about react form controls

Are these built on a headless library?
They use Radix primitives where the accessibility work is genuinely hard — combobox, select — and plain elements where it is not. The dependency list is on each control's page, so nothing arrives unannounced.
Do they work with React Hook Form?
Yes. Each one forwards its ref and takes `value`/`onChange`, which is all a `Controller` needs — and the uncontrolled ones work with a plain `register`.
Are these react form controls free to use?
All 12 are free to copy and use in your own projects, including commercial ones. A Pro licence exists for redistribution — shipping them inside a product other people buy — and the full terms are on the licence page.
How do I add one to my project?
Install it with the CLI: `npx hoverlab add field` writes the component and its dependencies into your project. Every artifact here also has a copy button for the raw source, and an "Open in sandbox" link if you would rather try it first.