Lab

Rocker Switch

A rocker switch, as on a mixer or a synth, the side pressed down sunk into the panel.

Audio UI

A rocker, as on a mixer's or a synth's panel: two sides, the one pressed down sunk into the panel. Underneath it is a switch, with its role, Space to flip it, and its form value (name). Its shape follows the style, from a pill to a square.

Installation

pnpm dlx shadcn@latest add @audio-ui/rocker-switch

Usage

import { RockerSwitch } from "@/components/audio-ui/rocker-switch";

<RockerSwitch aria-label="Power" checked={power} onCheckedChange={setPower} />
<RockerSwitch aria-label="Phase invert" offLabel="Ø" onLabel="Ø" orientation="horizontal" size="sm" />

API reference

Props · 6

Built by Ouest Labs, the source code is available on GitHub.
RSS