Launch prototype

Components

Toggle

A binary switch control built on React Aria. Supports an optional label/hint, a slim track variant, and two sizes - driven from config/design-system.config.ts.

Component Playground

Live instance - the controls read their options from the same config that drives the Variants section below.

sm · default

Controls

Size

Label

Hint

Sizes

Two sizes - sm (default) and md.

Small / Medium

sm
md

Slim

A thinner track with a bordered knob, for denser settings lists - pass slim.

Default / slim - off / on

default · off
default · on
slim · off
slim · on

With label

Pass a label to pair the control with descriptive text.

Labelled

With hint text

Add a hint for supporting detail beneath the label.

Labelled with hint

Disabled

Disabled dims the control and prevents interaction, in both the off and on states.

Disabled - off / on

Group

A stacked list of toggles - the common pattern for a settings page.

Settings list

API

PropTypeDefault
size"sm" | "md""sm"
slimbooleanfalse
labelReactNode-
hintReactNode-
isSelectedboolean-
defaultSelectedbooleanfalse
isDisabledbooleanfalse
onChange(isSelected: boolean) => void-
classNamestring-

Token anatomy

Swap --ui-bg-brand-solid to rebrand every selected track at once.

StateBackground tokenRing / border token
Offbg-tertiaryring-secondary
Onbg-brand-solid-
On + hoverbg-brand-solid_hover-
Slim knob - off / onbg-fg-whiteborder-toggle-border / border-toggle-slim-border_pressed
Disabled-opacity-50
Focus-visible outline-outline-focus-ring

Usage

import { Toggle } from "@/components/base/toggle/toggle";

<Toggle label="Enable notifications" defaultSelected />

Figma

No linked Figma file yet - this component was pulled in via the Untitled UI CLI, not designed in Figma first.