Animated Segmented Control
Use Animated Segmented Control for compact settings and view modes, such as interface density, layout style, theme, or alignment. It changes one local value at a time, rather than navigating between content panels.
Preview
List density
Choose how much room each row uses.
Installation
Usage
When to use it
Use this component for a small local mode switch. For navigation between content panels, use Fluid Tabs instead.
API
| Property | Type | Default | Description |
|---|---|---|---|
items | AnimatedSegmentedControlItem[] | required | Options rendered in the control. |
value | string | — | Controlled selected value. |
defaultValue | string | — | Initial selected value for uncontrolled usage. |
onValueChange | ( value: string, ) => void | — | Called after an option is selected. |
className | string | — | Additional CSS classes. |
ariaLabel | string | "View mode" | Accessible name for the group of options. |
Accessibility
Set ariaLabel to describe the setting. The control groups native toggle buttons, with Tab navigation and Space or Enter activation. Uncontrolled selection starts at the first enabled option and falls back when the selected option is removed or disabled. A controlled value remains the parent's responsibility. Keyboard selection and reduced-motion mode change the active surface immediately.
Was this page helpful?
Your response helps us improve component docs.