Component librarySegmented control
Components/Essentials

Segmented control

Free

Switch between views with an animated selection indicator.

npx shadcn@latest add https://tidalui.com/r/segmented-control.json
Desktop viewport

Installation

Terminal
npx shadcn@latest add https://tidalui.com/r/segmented-control.json

Import components/ui/tidal.css, components/ui/segmented-control.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.

Usage

Complete example source · Dependency and asset manifest

Loading the complete example…

API & behavior

Controlled: options ({value, label, disabled?}[]), value, onValueChange, label; optional className. Single-choice radio group. Arrow keys wrap enabled options; Home/End; disabled options skipped.

Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.

Building with an agent?Give it the installation guide and component catalog.