Figma UI kit
Form controls

Checkbox and radio

v1.2.1

Choose several (checkbox) or exactly one (radio) from a set.

Quick usage

Import the shared component; never copy its markup into a feature. The Web TSX tab beside the live stage has a complete, working example.

import CheckField from '@/shared/components/CheckField';

Live stage and code

The live component and its controls on the left, the code on the right; change a control and the code follows: Web TSX (the component in a working example), Tailwind and HTML (the markup it renders, with its data attributes), React Native, SwiftUI and Jetpack Compose. The header theme switch drives every stage.

Props

Read from the component's source when the docs build: names and defaults from its signature, types and descriptions from its JSDoc. A blank type means the prop has no JSDoc yet.

PropTypeDefaultDescription
labelstring-The row's text.
hintReact.ReactNodenullSecond line under the label, muted.
iconReact.ReactNodenullOptional glyph before the label.
className---
disabled-false-
...rest--Any other prop is passed through to the root element.

Source: frontend/src/shared/components/CheckField/CheckField.js

DOM contract

What the rendered element carries: the data attributes its styles key on, its roles and ARIA, its focus style, and whether its stylesheet draws the 44px hit boundary. Also read from the source.

Data attributesdata-disableddata-has-hint
RolesNative element semantics only
ARIANone set by the component
FocusNo :focus-visible rule of its own
44px hit boundaryThe whole row, label included, is one label element: the row is the hit target, not the 16px box.

Accessibility and touch

The label row is the target, not the 16px box.

Checkbox

Visible height 28px. The ::after boundary adds 8px above and below, so a gloved finger lands on a 44px target while the row keeps its density.

Rules and constraints

Use it for

  • Settings in a form, row selection in a table.

Avoid

  • Never a checkbox for an instant setting: that is a toggle.

Constraints

  • A 16px square box, terracotta when checked with a white tick.

More in Form controls