Segmented
Two to five exclusive options on a fill track; the active one raised, sliding in 180ms.
24h7d30d90d
<Segmented
aria-label="Period"
defaultValue="7d"
options={[
{ value: "24h", label: "24h" },
{ value: "7d", label: "7d" },
{ value: "30d", label: "30d" },
{ value: "90d", label: "90d" },
]}
/>import { Segmented } from "@logicplanes/kaeso-ui";Props
aria-labelstringThe control's accessible name.
defaultValuestringThe chosen option on first render.
disabledbooleanTurns off every segment.
fullWidthbooleanFills the width of its container.
onValueChange((value: string) => void)Called with the chosen option.
optionsSegmentedOption[]The options, as segments.
size"md" | "sm" = mdThe control's height.
valuestringThe chosen option, when you control it.