Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

Switch with On Label

A React switch with static On text label indicating the current enabled state with defaultChecked

Some switches need state confirmation—is it on or off? This React switch shows static On label when checked. Built with shadcn/ui Switch with defaultChecked and span text, the label reinforces current state—perfect for power toggles, enable-disable controls, simple on-off switches, minimal UIs, or any switch where showing the current state as text (On when enabled) provides additional confirmation beyond visual switch position and users benefit from explicit state labeling.

Switch with On Label preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.