Skip to main content
v7

Switch

An accessible toggle switch backed by a hidden checkbox, with animated thumb and keyboard support.

Package@g4rcez/componentsSectionForm Controls

Examples

Basic Switch

Renders a toggle with a label. The child content becomes the visible label text.

Basic

Controlled Switch

Use onCheck to receive the next boolean value and drive state externally.

Controlled

Disabled and Error States

disabled prevents interaction. error renders a message below the switch.

Disabled & error
This setting cannot be changed until the account security review is complete and an administrator approves the update.

When to use Switch

Use when

You need the documented Switch interaction or presentation in a product workflow.

Avoid when

A native HTML element already provides the Switch behavior you need.

Accessibility

Keep the Switch labeled and use its documented keyboard interaction. The component preserves visible focus and communicates state without relying on color alone.