Skip to main content
v0.1 dev

Component 11 · Forms

Switch

Apply an immediate binary setting.

implementedPhase 2stable

Overview

Apply an immediate binary setting. It transforms operator input into a labeled domain value while preserving recoverable input through validation, delay and offline queuing.

When to use

Use HE/Switch when you need to apply an immediate binary setting. Keep its role distinct from transport freshness, animal-health severity and model confidence.

Example

Atlantic · interactive specimen
<label class="he-switch"><input type="checkbox" checked><span class="he-switch__track"></span><span>Heartbeat alert</span></label>

Anatomy

1Persistent label
2Control
3Help or error
4Sync state

Anatomy stays identical in Pasture and Atlantic. A responsive layout may wrap or stack parts, but reading order and focus order remain equivalent.

Variants and states

Variants

offon

States

defaulthoverfocusdisabledloading

Accessibility

Name the setting, expose checked state, and avoid Save when the change is immediate.

  • Maintain a visible keyboard focus indicator and a logical focus sequence.
  • Never rely on colour alone for operational, freshness or severity state.
  • Keep touch targets at least 44 × 44 px unless the target is an inline text link.

Cross-platform contract

SurfaceCanonical nameStatus
FigmaHE/Switchstable
Web.he-switchimplemented
FlutterHeSwitchimplemented
Token rootcomponent.switchgenerated