About this set
Three segmented controls for choosing one option from a short list: a light Billing period control with Monthly, Yearly and Lifetime, a dark Theme control with Light, Dark and System, and a full-width Project status control whose three segments share a 340 pixel track equally. The selected segment lifts onto a white (or slate, in the dark variant) tile with a soft shadow. Use the light version inside forms and pricing tables, the dark one on dark toolbars, and the full-width one as a filter above a list or in a narrow sidebar. Each control is a fieldset with a visible legend, and each segment is a real radio input, visually hidden, followed by the label that draws the segment. Because they are native radios, the browser handles selection, arrow-key movement inside the group and form submission, and the CSS only reacts to :checked and :focus-visible. The Bootstrap version is a .btn-group of .btn-check radios restyled through the –bs-btn-* variables, and the Tailwind version uses named peer-checked variants on each label.
What’s included
- Light, dark and full-width variants
- Native radio inputs grouped in a fieldset with a legend
- Arrow keys move the selection, as in any radio group
- Focus outline drawn on the visible segment
- Colour transitions switch off under reduced motion
Accessibility
Each control is a fieldset whose legend names the group, and every segment is a labelled radio input, so screen readers announce the option, its position and whether it is selected. Tab moves into the group and the arrow keys change the selection. Keyboard focus draws a 2px indigo outline around the visible segment (a light indigo outline on the dark variant). The label colour transitions are removed when prefers-reduced-motion is set.
Customise it
Change the track colour on .seg (#eef0f4, or #101828 on .seg-dark) and the selected colours in the input:checked + label rule. In Bootstrap edit the --bs-btn-active-bg and --bs-btn-color variables on .seg .btn; in Tailwind edit the bg- and peer-checked/ utilities on each label.

















