Lab

Switches

Slant / Controls

Settings rows with a switch each, labelled by the row title.

The theme follows the link: share a page with ?theme=moon.

Usage

  • Each switch is a button with role="switch" and aria-checked.
  • The row title is the accessible name via aria-labelledby.

Keyboard

Tabmoves between switches
Space / Entertoggles the focused switch

Accessibility

  • The state is exposed as aria-checked, and the knob position repeats it visually.

Switches in React and SwiftUI.

Source

The React tab is the component’s real source; the SwiftUI tab is its twin in TUTTNKit.