Skip to main content
  1. Docs
  2. Components
  3. Forms

Switch

A setting, on or off, applied at once. A setting that waits for Save is a Checkbox.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<span role="switch">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Playground

Every prop, live, and the code it takes.

Every Monday at 9 am.

summary.tsx
import { Switch } from "@qeetrix/react";

<Switch
  label="Email me a weekly summary"
  description="Every Monday at 9 am."
  defaultChecked
/>

02

A setting

On or off, at once: no Save. The thumb moves to the end side in either direction.

Every Monday at 9 am.

03

A list of settings

Each its own row, each applied as it's switched.

04

Applied at once

checked and onCheckedChange: save as it changes, and say so.

Asked at the next sign-in.

On for 1,284 people. Saved.

05

Disabled

Say why in the description.

Needs a verified domain.

Next — SwitchUsage