Docs
Toggle

Toggle

The Toggle component functions as a two-state button, allowing users to switch between an "on" and "off" state with a single click.

Loading...

Setting Up the Toggle Component

npx shadcn@latest add toggle

Implementing the Toggle Component

<Toggle>Toggle</Toggle>

Practical Examples and Implementations

Basic Default Toggle Implementation

Loading...

Applying the Outline Variant

Loading...

Including Text within the Toggle

Loading...

Adjusting to a Small Size

Loading...

Adjusting to a Large Size

Loading...

Implementing a Disabled Toggle State

Loading...