ToggleTogglestock · do not build
51x31pt, drawn by SwiftUI. The on-state fill is the app .tint(), which is the only reason it is yellow. A rounded rectangle with a sliding knob built in a ZStack is a tier violation however closely it matches components.css.
Off
--component-bg-active track
On
--yellow-solid from .tint()
Disabled off
system opacity, not a token
Disabled on
system opacity
Size
51 × 31pt
Apple geometry, never restyled
Knob
27pt
2pt inset, white, system shadow
On fill
--yellow-solid
inherited from .tint()
Off fill
--component-bg-active
Do not. Rebuild this in a ZStack. A hand-built switch keeps its shape when Dynamic Type grows, which is the tell. It also loses VoiceOver, Reduce Motion and every future OS revision.