Shows the default look wired both ways: flipping it sends the new on/off value to a light, and the switch follows the light's live state. Intended effect: the living-room light turns on or off with a tap, and the switch stays correct when someone else changes it.
Shows the button look, a tile that glows in the tint color while on. Intended effect: a bold, thumb-sized tile for a setting you flip often, starting off.
Shows the icon-toggle look, where the symbol swaps between the on and off icons. Intended effect: a red microphone that shows a slashed mic when muted.
Shows the track fields: a longer track bent upward with a squarer knob. Intended effect: a 120 pt switch that bows 90 degrees, with its knob following the curve.
Shows the confirm option and a chosen haptic, with no background card. Intended effect: each flip gives a heavy buzz and a 3-second pill with Undo, so a risky switch can be reversed.
Shows the visible rule: the control appears only while another control has a given value. Intended effect: the Oscillate switch is hidden until the fan power switch is on.
Shows a long-press group opening a detail panel from the toggle. Intended effect: tap flips the heater, holding it opens a small panel of extra readouts.
Standard iOS toggle switch with label above and optional icon beside.
"button"
Tap-to-toggle button. Background highlights when on with a tinted glow.
"icon-toggle"
Icon that swaps between onIcon and offIcon with a symbol transition animation.
Track geometry and interaction
Switch styles support trackLength (31–400 pt at the default theme), trackCurvature (−180° to 180°), trackRadius, and knobRadius. Length is measured along the path. Positive curvature bows up; negative bows down. Tight curves are limited to keep the inner track edge from collapsing. Lengthen the track to allow a larger bend.
The knob follows the curved centerline throughout taps, remote changes, and drag release; square knobs rotate with the tangent. animation applies to all toggle styles, including custom durations and instant. Reduce Motion disables travel animation.
Tap to flip, or drag and release toward an endpoint. A flick uses its projected destination; a drag released on the original side emits no action. Cancellation returns to the current state. Zero-travel tracks still respond to taps.
Knob size is always 27/31 of the themed track height. Radii clamp to half their respective sizes. Curved track caps are round when trackRadius is within 0.5 pt of half the track thickness, otherwise they have sharp radial ends; intermediate curved fillets are not supported. Straight tracks honor intermediate radii. Give long or deeply curved tracks enough grid space to avoid clipping.