110k
New

Toggle

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

Component toggle-demo not found in registry.

Installation

pnpm dlx createui@latest add toggle

Usage

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

Examples

Outline

Use variant="outline" for an outline style.

Component toggle-outline not found in registry.

With Text

Component toggle-text not found in registry.

Size

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

Component toggle-sizes not found in registry.

Disabled

Component toggle-disabled not found in registry.

API Reference

See the Radix Toggle documentation.