Compact inline toggle for switching between a small set of mutually exclusive options. Used in table toolbars, filter bars, and view switchers.
<AppSegmentedControl v-model="selected" :options="["All","Active","Pending"]" />
modelValue / v-modelstring—The currently selected value. Should match the value field of one of the options.optionsstring[] | { label: string; value: string }[]—Required. Segment options. Pass a plain string array as a shorthand — each string is used as both label and value.variant'default' | 'primary' | 'secondary' | 'ghost''default'Visual style. Use ghost on coloured backgrounds (e.g. the royalblue header).size'xs' | 'sm' | 'md' | 'lg''sm'Controls text size and padding of each segment.Pass a plain string array as a shorthand when label and value are the same. Use the object form when you need different display text and underlying values.
String shorthand
<AppSegmentedControl v-model="view" :options="['All', 'Active', 'Pending']" />Object form
<AppSegmentedControl
v-model="status"
:options="[
{ label: 'All clients', value: 'all' },
{ label: 'Active only', value: 'active' },
{ label: 'Pending review', value: 'pending' },
]"
/>