ortaui

Toggle

A pill button that stays pressed.

Installation#

npx shadcn add @ortaui/toggle

Examples#

Variants#

Sizes and states#

API reference#

PropTypeDefaultDescription
variant"default" | "outline""default"Pressed fills with the hover tone, or inverts for outline.
size"sm" | "md" | "icon""md"Same heights as Button.
pressed / defaultPressedboolean-Controlled or uncontrolled state.
onPressedChange(pressed: boolean) => void-Called when toggled.