search ESC

Switches

Toggle switches with sizes, color variants, inner icons/text, label placement, soft variants, and four visual styles (iOS / Android / Material 3 / Ant Design).

Basic Switches

States

Sizes

Color Variants

Contextual Label Colors

Switch with Inner Icons
Switch with Inner Text

Switch with Icon + Text

iOS-Style Switches

Clean, rounded iOS-inspired switch with a slightly larger thumb and iOS-native system colors.

Default iOS switch

iOS color variants

iOS sizes

Android / Material Design 2

Material Design 2 — thin track with an elevated thumb that hangs above it.

Material 3

Material Design 3 — outlined track, larger thumb that grows on checked state.

Ant Design

Ant Design — slightly taller track, clean shadow.

Label Placement

Position the label end (default), start, top, or bottom relative to the switch.

Soft Switches

Soft variant with a muted track background and the variant color applied only to the thumb.

CSS reference
ClassPurpose
.lp-switchWrapper label containing a hidden <input type="checkbox"> + track + label
.lp-switch-trackThe visible pill-shaped track; contains the thumb (via ::before) and optional on/off content
.lp-switch-labelLabel text (required for contextual label variant)
.lp-switch-on / .lp-switch-offInner content shown on the checked / unchecked side of the track
.lp-switch-sm / -lgSize variants
.lp-switch-{primary|secondary|success|danger|warning|info}Filled color variants
.lp-switch-soft-{color}Soft variant — muted track, colored thumb
.lp-switch-label-contextualTints label text to match color variant when checked
.lp-switch-icon / -text / -icon-textWider track with inner icon, text, or both
.lp-switch-label-{start|top|bottom}Label placement variants
.lp-switch-ios (+ -sm/-lg/-primary/-success/…)iOS-style switch with system colors
.lp-switch-androidMaterial Design 2 style — thin track with elevated thumb
.lp-switch-m3Material Design 3 style — outlined track, growing thumb
.lp-switch-antdAnt Design style