Components · Form

Checkbox

A checkbox lets the user turn one or more options on or off, independently of each other. The choice is saved when the form is submitted.

Tokens, sizes, measurements, states and requirements. Values come from the live token package and from Figma: Checkbox.

Design Tokens

Resolved from the live token package.

ModePart · stateTokenValue

The checkmark and dash are SVG data URIs, which cannot use var(). Their colors (white, black, #939595 for the disabled check) are set in the SVG and match icon-inverted, surface-100 and surface-40.


Sizes

SizeAreaBoxMarginGap to labelLabel
Large · Desktop24×24px16×16px4px8pxbody-md: 17/24, 0.32px (769px and up)
Large · Mobile24×24px16×16px4px8pxbody-md: 16/22, 0.32px (below 769px)
Small · both20×20px14×14px3px4pxbody-sm: 14/20
Inline menuBox as above, then a 24×24px dropdown arrow (icon-primary, dark: icon-inverted). Gap 8px Large, 4px Small. No label.

Breakpoint. Figma has two versions of every checkbox: “XLarge–Large–Medium” (Desktop) and “Small–XSmall” (Mobile). In Figma the box, area, gap and Small label are the same in both; only the Large label differs, following body-md (17/24 on Desktop, 16/22 on Mobile). The component switches at 769px by itself. The Breakpoint toggle in the Playground on Examples & Guidelines forces one of them for preview only.

Tile sizes

TileDesktopMobileInsideBorder (enabled)
Color swatch24×24px24×24px16px swatch, 2px padding1px border-secondary
Image48×48px40×40pximage 6px from the edge, object-fit: contain1px border-primary
Number48×48px40×40pxlabel-md 16/16, 0.48px, Bold, uppercase1px border-secondary

Hover is 1px border-hover, selected is a 2px border-selected frame, selected hover is a 2px border-selected-hover frame. The fill is surface-raised-primary. In Figma the mobile Color Swatch has a 20×18px swatch box in the selected states; this page uses the 16px swatch for every state and breakpoint.


Measurements

Dimensions

Box and margin of each size. The shaded area is the 4px margin (3px in Small) that leaves room for the focus ring; the lines show its value.

The box at 4× size. The numbers are read from the component and are real pixels.
AttributeLargeSmall (.form-checkbox-item--sm)
Area24×24px20×20px
Box16×16px, 1px border (dark mode: 2px on hover)14×14px
Margin around the box4px3px
Focus ring2px line, 2px offset (fills the 4px margin)2px line, 1px offset (fills the 3px margin)
Gap to the label8px4px
Checkmark16px mark in the box12px (background-size)
CornersSquare

Spacing

The same margin and gap values as spacing tokens.

PartLargeSmall
Margin around the boxspace-43px: no spacing token
Gap box to labelspace-8space-4
Gap box to arrow (Inline menu)space-8space-4

There is no spacing token for 3px. The Small margin is 3px in Figma. Open point: keep 3px, or add a token.


States

Every state for each value. Hover and focus are forced on this page with data-state so they can be seen at the same time; in your code they come from :hover and :focus-visible. The cells are live, so click to change the value (disabled cells do not respond).

Mode
Breakpoint
Size
Type
StateUncheckedCheckedMixed

A checked checkbox in hover is “Selected hover”, in focus “Selected focus”. Every state in Figma is shown: nothing is left out for any size, mode or type.

Tiles

Enabled, hover, selected and selected hover for each tile. Hover is forced on this page. The Number tile only has enabled and hover in Figma.

StateColor swatchImageNumber

Selected is a 2px frame, drawn as a 1px border plus a 1px inset line so the tile never changes size. Disabled is not defined in Figma for tiles.


Typography

PartTypeSize / line heightLetter spacingWeight
Label, Largebody-md16/22 mobile, 17/24 from 769px0.32pxRegular
Label, Smallbody-sm14/200.36pxRegular
Number tilelabel-md16/160.48pxBold, uppercase
Filter row name and countbody-md16/22 mobile, 17/24 from 769px0.32pxRegular
Color name in the libraryalt-label-lg16/16 mobile, 18/18 from 769px0.32px / 0.36pxMedium, uppercase

Breuer Condensed. The disabled label uses text-disabled.


Structure

Elements

ElementPropertyValue
AreaSize24×24px (Large), 20×20px (Small): the box plus margin
BoxShapeSquare, 1px border, appearance: none on the native input
Checkmark and dashDrawingSVG data URI as background-image. Never an image file.
LabelElement<span> inside the <label>; 8px (Large) or 4px (Small) from the box
Arrow (Inline menu)Size24×24px, .cb-arrow, icon-primary (dark: icon-inverted)

Types

TypeClassUse
Standard.form-checkbox-itemBox and label.
Small.form-checkbox-item--smDense layouts: tables, filters.
Dark.form-checkbox-item--darkOn surface-100 or surface-80.
Inline menu.form-checkbox-item--menu with .cb-arrowTable header: select all and open a menu. No label.
Check icon.check-icon on the cellRead-only permission in a table. Always disabled, light only.
Tile: color swatch.form-checkbox-tileFiltering and PDP. Needs --swatch.
Tile: image.form-checkbox-tile--imagePDP: one at a time with radio.
Tile: number.form-checkbox-tile--numberA <button> with “+10”.
Filter row.form-checkbox-tile--rowColor tile with name and count; the whole row is the click target.

Motion

None. The checkbox changes state at once, with no transition and no animation.


Behavior

InputResult
Click box or labelToggles checked. Clearing the mixed state also makes it checked.
Tab / Shift+TabMoves between checkboxes. The focus ring shows with :focus-visible only.
SpaceToggles the focused checkbox.
MixedSet input.indeterminate = true in JavaScript. It cannot be set in HTML.
DisabledNot focusable, no hover. The label turns text-disabled through :has(input:disabled).
Without labelAdd aria-label. Never use an image or SVG file for the box.

Accessibility Requirements

TopicRequirement
ElementA native <input type="checkbox">. The role, the state and the keyboard behavior come from the browser.
NameA visible <label>, or aria-label when there is no text (Inline menu, tiles, table rows).
GroupRelated checkboxes in a <fieldset> with a <legend>.
MixedSet with indeterminate in JavaScript, so assistive technology reads “mixed”.
FocusRing with border-focus, 2px, offset 2px, on :focus-visible (WCAG 2.4.7, 1.4.11).
DisabledNot focusable. The label and the box use disabled tokens, which are exempt from contrast requirements.
TilesNo visible label: aria-label is required. On a PDP, show the name of the chosen option next to the group so the choice is not carried by the picture alone.
ColorSelected is not shown by color alone: it adds a checkmark (box) or a thicker frame (tile).