Toggle

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

shadcn/ui docs

Installation

pnpm dlx shadcn@latest add https://neobrutalism.dev/r/toggle.json

Usage

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

Examples

Default

Outline

Use variant="outline" for an outline style.

With Text

Size

Use the size prop to change the size of the toggle.

Disabled