AppSegmentedControl
Pick one of a few options, drawn as one track with a sliding indicator. Underneath it is a radio group: native radio inputs in a <fieldset> with a <legend>, so it has one Tab stop, the arrow keys move and select, and screen readers announce "2 of 3". The indicator travels on a transform (as AppTabs and AppNavbar do) on --vt-duration; under reduced motion it jumps. Segments are equal, sized to the widest label.
Install: pnpm add-component AppSegmentedControl
Basic usage
Tab into the control, then use the arrow keys. The second control hides its legend; the disabled segment is skipped.
Small
API
modelValue(string | number): The selected value (use v-model).items(SegmentedItem[]): { label, value, icon?, description?, disabled? } for each segment. description is read to screen readers only.label(string): Names the group (the legend). Required.hideLabel(boolean): Keeps the legend for screen readers only.size('sm' | 'md'): Track height from the density tokens; the hit area stays 44px.disabled(boolean): Disables the whole fieldset. Single items take disabled in items.name(string): The native name, for a form that posts without JavaScript.