Skip to content
SevenUI
Sign in
On this page

Toggle

Displays a toggle built on the Base UI Toggle primitive: a two-state button for options like bold, italic, or mute.

Installation

Bash

Usage

Examples

Variants

Sizes

Examples

Variants and sizes

API reference

Toggle

Extends the Base UI Toggle primitive — all its props apply. Give icon-only toggles an aria-label.

PropTypeDefault
variant"default" | "outline""default"
size"default" | "sm" | "lg""default"
pressed / defaultPressedbooleanfalse
onPressedChange(pressed: boolean) => void—
disabledbooleanfalse

toggleVariants is also exported for styling custom elements.

Was this page helpful?