Segmented control
The background slides to the option you choose instead of cutting to it, so you see where you were and where you went.
Variant
Controls
▾
Code
import { SegmentedControl } from "@/components/ui/kit/ui";
<SegmentedControl
value="one"
ariaLabel="Choose a view"
options={options}
onChange={setValue}
/>Every state
Usage
Tokens it uses
| --ink | … |
|---|---|
| --paper | … |
| --line-control | … |
| --line-2 | … |
| --muted | … |
| --font-label | … |
| --dur-base | … |
| --ease-in-out | … |
Values are read live from the stylesheet, so they follow the site theme.
Spec
- Trigger
- Duration
- --dur-base 240ms
- Easing
- --ease-in-out cubic-bezier(0.65, 0, 0.35, 1)
- Reduced motion