Skip to content
Core ElementsFree

Toggle

A standalone two-state button that can be pressed or unpressed.

Usage

Installation

bash
npm install @wunderui/react

Then import what you need:

tsx
import { Toggle, ToggleButton } from "@wunderui/react"

Examples

Default

Off — click to turn it on.

Hover

The muted fill while the pointer is over it.

Pressed

On — the tinted fill stays until it is clicked again.

Disabled

Visible but not available.

In context

How the component is used inside real screens — the same compositions as the Usage section of the Figma page.

Editor toolbar

Bold, italic and list toggles above a text editor.

Q3 planning notes

Focus on the three accounts that renew in October. Pull the usage reports before Thursday.

API Reference

PropTypeDefault
pressedboolean—
defaultPressedbooleanfalse
onPressedChange(pressed: boolean) => void—
disabledbooleanfalse