unscripted/ui

Radio Group

Native radios in a fieldset — the selected dot is a border-width trick, and arrow-key navigation is the platform's roving tabindex.

plain CSS — works everywhere

How it works

  • The dot is checked:border-[5px] — the thick primary border leaves a background-colored hole in the middle. No pseudo-element needed.
  • <fieldset> + <legend> group the options for screen readers.
  • Arrow keys move selection within the group and Tab treats it as one stop — that’s native radio behavior JS libraries reimplement as “roving tabindex”.