Toggle

Toggle is like light switches for your digital digs. Flip 'em on, and they light stuff up; flip 'em off, and it's lights out.

If you are using Tailwind v4, please refer to the 2.x documentation. This documentation assumes you are using Tailwind v3.

Basic

A toggle button lets folks flip a choice on or off, like switching between two vibes or modes.

Installation

If you hit any issues, make sure you check out the installation guide here.

Manual Installation

Sometimes, using the CLI is the way to go, so make sure you install the necessary dependencies for the components you want to use.

Appearance

You can change the appearance of the toggle button by passing an appearance prop.

Shape

You can change the shape of the toggle button by passing a shape prop.

Size

You can change the size of the toggle button by passing a size prop.

Controlled

You can control the state of the toggle button by passing a isSelected prop.

Disabled

You can disable a toggle button by passing a disabled prop.