Selection
Radio group
A radio group asks for exactly one choice from two to five options that stay in view, such as when a reminder should go off.
In kanso-ui as RadioGroup
Variants and sizes
- Stacked group (
k-groupon the<fieldset>,k-radioon each option): the only layout, so long labels wrap without crowding. - With details: a time or a count after the label, in
k-mono k-muted.
States
- Not chosen: an empty
outlinering. - Chosen: the ring turns
inkand a dot fills its centre. Shape and fill, not hue. - Hover: the pointer turns into a hand.
- Focus: a 2px
focus-ringring 2px outside the circle. - Disabled: ring and label drop to
inkat 38% (state-disabled-content), with the reason underneath (k-radio__reason): "It’s already 14:32, so 1 hour before has passed". - Error: rare, since a group starts with a choice. When nothing is chosen and an answer is required, the message goes under the group with the
erroricon.
Do and don’t
Do
Start with the most common safe choice selected, like "15 min before".
Keep options short and parallel.
Show what an option means when it helps, like the time it goes off.
Say why an option is unavailable.
Don’t
Use radios to start an action or open another page.
Put options side by side; stack them so long labels wrap cleanly.
What you provide
- Legend, and a
namefor the group. - Options: label, value, an optional detail, and disabled with its reason.
- The chosen value.