Segmented control preview
Switch between views with an animated selection indicator.
free · Essentials · primitive
When to use
- Use it when a product interface needs switch between views with an animated selection indicator.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose tidal-button instead when press, loading, success and disabled states is the actual interface need, rather than segmented control.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add https://tidalui.com/r/segmented-control.jsonImport components/ui/tidal.css, components/ui/segmented-control.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/segmented-control.css";
import{TidalSegmentedControl}from"./components/ui/segmented-control";
export default()=><div className="tidal-scope"><TidalSegmentedControl label={"Demo"} onValueChange={() => {}} options={[{value:"value",label:"Demo"}]} value={"value"}/></div>;API and props
TidalSegmentedControl.label (required)stringRequired label value accepted by this exported component.
TidalSegmentedControl.onValueChange (required)(value: string) => voidCallback invoked when the value change interaction is proposed.
TidalSegmentedControl.options (required)Array<SegmentOption>Required options value accepted by this exported component.
TidalSegmentedControl.value (required)stringRequired value value accepted by this exported component.
TidalSegmentedControl.classNamestring | undefinedOptional class name value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Install the declared registry dependencies and render inside a tidal-scope with the foundation stylesheet loaded.