Skip to content
GitHub

Toggle

A two-state button that can be toggled on or off

Installation

Usage

Controlled

Use the pressed and onPressedChange props to control the toggle state programmatically.

State

Disabled

Use the disabled prop to disable the toggle.

Variants

Default

Outline

Sizes

Small

Medium

Large

Examples

Icon Group

Use multiple toggles with icons for toolbar-style controls.

API Reference

Toggle

Toggle button for on/off or selected state. Use asChild for custom elements.

ToggleIndicator

Icon or indicator shown when toggle is active. Omitted when used as child.


For a complete list of props, see the Ark UI documentation.