About this set
Four radio button treatments for one-of-many choices. The classic dot keeps a light ring and scales a blue dot into it when selected. The filled ring turns the whole circle blue with a small white centre, the look Bootstrap uses by default. The tick variant draws a check mark inside the circle instead of a dot, which suits yes/no confirmations. The inline row lays three short options side by side for sizes and similar compact sets. Each option is a label around a real radio input, hidden with zero opacity rather than display none so it stays focusable, followed by a span that draws the circle; its ::after pseudo-element is the dot or tick. Radios that share a name form a group, so the browser handles arrow-key movement and single selection. The Bootstrap version uses .form-check-input radios with the dot and tick supplied as SVG background images through –bs-form-check-bg-image. The Tailwind version uses peer-checked and after: utilities.
What’s included
- Classic dot, filled ring, tick and inline row
- Real radio inputs grouped by name
- Each group labelled with role="radiogroup"
- Dot or tick scales in on selection
- No JavaScript
Accessibility
Each radio has its visible text as the label, and each group has role="radiogroup" with an aria-label. Tab moves into a group and the arrow keys change the selection, as with native radios. Focus shows a 2px blue outline around the circle, and the unselected ring reaches 3:1 contrast. The dot animation is disabled under prefers-reduced-motion.
Customise it
Plain CSS: change #2563eb in the .rad input:checked+.rd rules and the size of .rd. Bootstrap: set --choice-accent on .choice and edit the fill in the SVG data URIs. Tailwind: swap blue-600 in the peer-checked: and after:bg- classes and size-[22px].






