1. Docs
  2. Toggle Button

Toggle Button

A toggle button allows a user to toggle a selection on or off, for example switching between two states or modes.

Installation

Install the following dependencies:

Copy and paste the following code into your project.

Loading...

Update the import paths to match your project setup.

Usage

import { Toggle } from "@/components/ui/toggle"
<Toggle>Toggle</Toggle>

Examples

Default

Outline

With Text

Small

Large

Disabled