Skip to main content

Module toggle

Module toggle 

Source
Expand description

Toggle primitives (Radix-aligned outcomes).

This module provides a stable, Radix-named surface for composing toggle behavior in recipes. It intentionally models outcomes rather than React/DOM APIs.

This file is part of the stable primitives surface (do not move without an ADR update).

Upstream reference:

  • repo-ref/primitives/packages/react/toggle/src/toggle.tsx

Structs§

ToggleRoot
A Radix-shaped Toggle root configuration surface.

Functions§

toggle_a11y
A11y metadata for a toggle-like pressable.
toggle_use_model
Returns a pressed-state model that behaves like Radix useControllableState (pressed / defaultPressed).