Toggle

Button

Stateful toggle button with on/off states, icon support, and form integration

Basic Usage

Variants

Sizes

With Text

Disabled

Controlled

Usage Guidelines

When to Use

  • Toolbar toggles
  • View mode switching
  • Boolean button states

Accessibility

  • aria-pressed state
  • State change announced

Performance

  • CSS-only pressed state
  • Minimal re-renders

Common Mistakes

  • Unclear pressed state
  • Using for binary data (use Switch)

Frequently Asked Questions

View on GitHub

See the full source code on GitHub