Segmented Control
A hotbar of choices with a white selector that slides between slots.
Install and use
The first command adds the component and the Mine theme, the second adds this example. Render <Mine> once near your root for the skin, sounds and narrator.
"use client"
import { Field, FieldLabel } from "@/components/ui/field"
import {
SegmentedControl,
SegmentedControlIndicator,
SegmentedControlItem,
} from "@/components/ui/segmented-control"
function Example() {
return (
<Field>
<FieldLabel>View</FieldLabel>
<SegmentedControl defaultValue="list">
<SegmentedControlIndicator />
<SegmentedControlItem value="list">List</SegmentedControlItem>
<SegmentedControlItem value="grid">Grid</SegmentedControlItem>
<SegmentedControlItem value="board">Board</SegmentedControlItem>
</SegmentedControl>
</Field>
)
}
export { Example }