ortaui

Toggle Group

A track of toggles. With a single selection one highlight slides to the pressed item; with multiple, every pressed item gets its own fill.

Installation#

npx shadcn add @ortaui/toggle-group

Examples#

Single (sliding highlight)#

Multiple#

API reference#

PropTypeDefaultDescription
surface"default" | "raised"autoLook on a panel. Unset: raised (page fill + border) inside any [data-surface] container. "raised" forces it anywhere; "default" keeps the muted fill even inside a surface.
value / defaultValuestring[]-Pressed item values.
multiplebooleanfalseAllow several pressed items; turns off the sliding highlight.
size"sm" | "md""md"Item height 28px or 32px.
onValueChange(value: string[]) => void-Called when the selection changes.