Toggle

A two-state button that can be on or off.

Default

Sizes

Pressed

Controlled

Bold off

Disabled

With Text

Ghost

API Reference

Toggle

A two-state button built on Base UI Toggle with variant and size styling.

PropTypeDefaultDescription
variant'default' | 'ghost''default'Visual style of the toggle
size'sm' | 'default' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg''default'Size of the toggle
classNamestring-Additional CSS classes
...propsReact.ComponentProps<typeof BaseToggle>-Base UI Toggle props including pressed, onPressedChange, disabled