# Toggle

> A two-state button that can be either on or off.

Source: https://ui.cortexcn.dev/docs/components/toggle

## Installation

```bash
npx shadcn@latest add @cortexcn/toggle
```

## Usage

```tsx
import { Toggle, toggleVariants } from "@/components/toggle";
```

## Examples

### Basic

### Outline

### Sizes

### With button text

### With button icon

### With button icon and text

### Disabled

### With icon

Adapted from the [shadcn/ui Toggle](https://ui.shadcn.com/docs/components/radix/toggle) (MIT).