Studiov0.6.0

Toggle

Tier 1shadcn
Actions

A two-state button that toggles between pressed and unpressed with visual feedback.

Live Preview

Code

import { Toggle } from "@regen/ui";

<Toggle />

Props Inspector

No configurable props for this component.

Documentation

Use Cases

  • Bold/italic/underline text formatting
  • Show/hide panels
  • On/off feature flags

Do

  • Use aria-pressed semantics (built-in)
  • Use variant='outline' for subtle toggles

Don't

  • Don't use for binary preferences — use Switch
  • Don't use for navigation — use Tabs