Toggle
Toggle button with aurora styling variants.
Installation
npx popcn add toggleBasic Usage
Default
With Icon
Variants
Default
Outline
Aurora
Glass
Sizes
Small
Default
Large
Icon
Controlled
Controlled Toggle
Multiple Toggles
Text Formatting
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| pressed | boolean | - | Controlled pressed state |
| onPressedChange | (pressed: boolean) => void | - | Callback when pressed state changes |
| variant | "default" | "outline" | "aurora" | "glass" | "default" | Toggle variant style |
| size | "default" | "sm" | "lg" | "icon" | "default" | Toggle size |
| disabled | boolean | false | Disable the toggle |