Accessibility
ThemedSwitch from @prepared911/ui-core wraps Radix RadioGroup to render a sliding-track switch with two or three icon-only options. The primitive handles roving focus, radio semantics, and single-selection enforcement; your job is to label the group and each option.
role="radiogroup".role="radio" with aria-checked.aria-hidden; option labels carry the accessible names.forced-colors: active, the knob keeps a visible border and selected position.ariaLabel or labelledBy on the root so the purpose of the control is announced. In development, missing names log a [ui-core][ThemedSwitch] console warning.label string because the visible control is icon-only.role="radiogroup" on the root.role="radio" with aria-checked="true" or "false".Per-option hit targets are compact to match Switch dimensions. At the default Medium size, each lane is roughly 18 CSS pixels tall — below the 24×24 px AA minimum when used as a standalone target.
Medium or Large for primary, frequently used controls.Small for dense toolbars or secondary contexts where surrounding whitespace satisfies the spacing exception (no adjacent targets within a 24 px circle).SegmentedControl with labeled segments instead.SegmentedControl or Select.Switch.