Actions

Toggle

A pressable two-state control with variants, sizes, and accessible state.

⠋

Install

npx shadcn@latest add https://4af.selfsimilar.dev/r/toggle.json

Usage

import { Toggle } from "@/components/ui/toggle";

<Toggle aria-label="Pin item">Pin</Toggle>

API

Main export: Toggle

A Base UI pressed/unpressed control using the Button appearance and sizes, with optional icon-fill behaviour and pressScale={false} support.

On this page