Toggle

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

Installation

pnpm add @ag/ui

Usage

import { Toggle } from "@ag/ui"
<Toggle>Toggle</Toggle>

Examples

Outline

Use variant="outline" for an outline style.

With Text

Size

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

Disabled

RTL

To enable RTL support in shadcn/ui, see the RTL configuration guide.

API Reference

See the Radix Toggle documentation.