Selection
Checkbox
A checkbox turns one option on or off, alone or in a group where any number can be chosen, and a parent checkbox selects a whole list at once.
In kanso-ui as Checkbox
Anatomy
- Box: 20px with 6px corners and a 2px
outlineborder onsurface. - Mark: a tick when checked, a bar when mixed, in
on-inkon aninkfill. - Label: right of the box. The whole row, at least 48px tall, is the target.
- Group (optional): a
<fieldset>whose<legend>names the list. - Parent (optional): "Select all files", above items indented to line up with its label.
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-check | gap | 12px (space-md) |
min-height | 48px (size-control-lg) | |
font | 400 15px/20px font-plain |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
paper | --kui-color-paper | #fafafa | #121212 |
surface | --kui-color-kanso-surface | #ffffff | #1c1c1c |
ink | --kui-color-ink | #1a1a1a | #ececec |
on-ink | --kui-color-on-ink | #fafafa | #121212 |
ink-muted | --kui-color-ink-muted | #5c5c5c | #b3b3b3 |
outline | --kui-color-outline | #8a8a8a | #8c8c8c |
focus-ring | --kui-color-focus-ring | #1a1a1a | #ececec |
size-control-lg | --kui-sizing-kanso-control-lg | 48px | 48px |
space-xs | --kui-spacing-kanso-xs | 4px | 4px |
space-md | --kui-spacing-kanso-md | 12px | 12px |
space-3xl | --kui-spacing-kanso-3xl | 32px | 32px |
state-disabled-content | --kui-state-layer-opacity-kanso-disabled-content | 0.38 | 0.38 |
font-plain | --kui-typography-font-family-plain | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif |