role checkbox
Checkbox draft v0.1.0
Lets people turn one option on or off, or pick any number of options from a list.
A checkbox is a binary choice with a visible label: checked or unchecked, and a third, partially checked look when it stands for a group whose members disagree. Several checkboxes side by side let people pick any number of options; one checkbox alone confirms a statement (accepting terms, remembering a session). A setting that takes effect immediately is a Switch; a choice of exactly one option is a Radio group.
Tokens
From packages/tokens/src/components/checkbox.tokens.json. Path grammar: checkbox.<part>.<property>[.<option>][.<state>]. Every value aliases a semantic token.
No token matches.
Part container (2)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
checkbox.container.column-gap
Between the control and the label column.
|
dimension |
{space.8}
|
8px
|
--checkbox-container-column-gap
|
checkbox.container.row-gap
Between the label and its description.
|
dimension |
{space.2}
|
2px
|
--checkbox-container-row-gap
|
Part control (24)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
checkbox.control.size.small
|
dimension |
{size.2}
|
16px
|
--checkbox-control-size-small
|
checkbox.control.size.medium
|
dimension |
{size.3}
|
20px
|
--checkbox-control-size-medium
|
checkbox.control.border-radius.small
|
dimension |
{corner-radius.2xs}
|
2px
|
--checkbox-control-border-radius-small
|
checkbox.control.border-radius.medium
|
dimension |
{corner-radius.xs}
|
4px
|
--checkbox-control-border-radius-medium
|
checkbox.control.border-width
|
dimension |
{stroke-width.md}
|
1.2px
|
--checkbox-control-border-width
|
checkbox.control.background.default
|
color |
{global.bg.level.0.default}
|
light
#FDFDFD
dark
#191919
|
--checkbox-control-background-default
|
checkbox.control.background.hover
|
color |
{global.bg.level.0.hover}
|
light
#F7F6F6
dark
#212121
|
--checkbox-control-background-hover
|
checkbox.control.background.checked
|
color |
{global.bg.accent.brand.default}
|
light
#175DD6
dark
#9EE7FA
|
--checkbox-control-background-checked
|
checkbox.control.background.indeterminate
|
color |
{global.bg.accent.brand.default}
|
light
#175DD6
dark
#9EE7FA
|
--checkbox-control-background-indeterminate
|
checkbox.control.background.disabled
|
color |
{global.bg.state.disabled.default}
|
light
#B6B4B41a
dark
#7676764d
|
--checkbox-control-background-disabled
|
checkbox.control.border-color.default
|
color |
{global.border.accent.neutral.default}
|
light
#323031
dark
#B9B7B7
|
--checkbox-control-border-color-default
|
checkbox.control.border-color.hover
|
color |
{global.border.accent.neutral.default}
|
light
#323031
dark
#B9B7B7
|
--checkbox-control-border-color-hover
|
checkbox.control.border-color.checked
|
color |
{global.border.accent.brand.default}
|
light
#1148A9
dark
#53D6F2
|
--checkbox-control-border-color-checked
|
checkbox.control.border-color.indeterminate
|
color |
{global.border.accent.brand.default}
|
light
#1148A9
dark
#53D6F2
|
--checkbox-control-border-color-indeterminate
|
checkbox.control.border-color.invalid
|
color |
{global.border.base.functional.error.default}
|
light
#C01619
dark
#E12A23
|
--checkbox-control-border-color-invalid
|
checkbox.control.border-color.disabled
|
color |
{global.border.state.disabled.default}
|
light
#B6B4B466
dark
#363636b2
|
--checkbox-control-border-color-disabled
|
checkbox.control.color.checked
|
color |
{global.icon.on-accent.brand.default}
|
light
#FBFCFD
dark
#09191D
|
--checkbox-control-color-checked
|
checkbox.control.color.indeterminate
|
color |
{global.icon.on-accent.brand.default}
|
light
#FBFCFD
dark
#09191D
|
--checkbox-control-color-indeterminate
|
checkbox.control.color.disabled
|
color |
{global.icon.state.disabled.default}
|
light
#8C8C8C
dark
#9D9B9Cb2
|
--checkbox-control-color-disabled
|
checkbox.control.outline-width.focus-visible
|
dimension |
{focus.ring.width}
|
2.4px
|
--checkbox-control-outline-width-focus-visible
|
checkbox.control.outline-offset.focus-visible
|
dimension |
{focus.ring.offset}
|
4px
|
--checkbox-control-outline-offset-focus-visible
|
checkbox.control.outline-color.focus-visible
|
color |
{color.focus.ring}
|
light
#175DD6
dark
#9EE7FA
|
--checkbox-control-outline-color-focus-visible
|
checkbox.control.transition.duration
|
duration |
{duration.fast}
|
150ms
|
--checkbox-control-transition-duration
|
checkbox.control.transition.easing
|
cubicBezier |
{easing.standard}
|
cubic-bezier(0.2, 0, 0, 1)
|
--checkbox-control-transition-easing
|
Part label (4)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
checkbox.label.color.default
|
color |
{global.text.on-base.neutral.primary}
|
light
#0E0D0D
dark
#D2CECF
|
--checkbox-label-color-default
|
checkbox.label.color.disabled
|
color |
{global.text.state.disabled.default}
|
light
#8C8C8C
dark
#9D9B9Cb2
|
--checkbox-label-color-disabled
|
checkbox.label.typography.small
|
typography |
{body.family}{body.size.sm}{body.weight.regular}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":14,"unit":"px"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--checkbox-label-typography-small-font-family--checkbox-label-typography-small-font-size--checkbox-label-typography-small-font-weight--checkbox-label-typography-small-line-height--checkbox-label-typography-small-letter-spacing
|
checkbox.label.typography.medium
|
typography |
{body.family}{body.size.md}{body.weight.regular}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":16,"unit":"px"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--checkbox-label-typography-medium-font-family--checkbox-label-typography-medium-font-size--checkbox-label-typography-medium-font-weight--checkbox-label-typography-medium-line-height--checkbox-label-typography-medium-letter-spacing
|
Part description (4)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
checkbox.description.color.default
|
color |
{global.text.on-base.neutral.secondary}
|
light
#323031
dark
#B9B7B7
|
--checkbox-description-color-default
|
checkbox.description.color.disabled
|
color |
{global.text.state.disabled.default}
|
light
#8C8C8C
dark
#9D9B9Cb2
|
--checkbox-description-color-disabled
|
checkbox.description.typography.small
|
typography |
{body.family}{body.size.xs}{body.weight.regular}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":12,"unit":"px"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--checkbox-description-typography-small-font-family--checkbox-description-typography-small-font-size--checkbox-description-typography-small-font-weight--checkbox-description-typography-small-line-height--checkbox-description-typography-small-letter-spacing
|
checkbox.description.typography.medium
|
typography |
{body.family}{body.size.sm}{body.weight.regular}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":14,"unit":"px"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--checkbox-description-typography-medium-font-family--checkbox-description-typography-medium-font-size--checkbox-description-typography-medium-font-weight--checkbox-description-typography-medium-line-height--checkbox-description-typography-medium-letter-spacing
|