shadcn's Toggle in Notchset, plus the latch: a key that stays down on its plate while on, its node lit and its sub-label flipping to ON. State reads from position as well as colour.
pnpm dlx shadcn@latest add https://beautiful-ui.dev/r/toggle.jsonpnpm dlx shadcn@latest add https://beautiful-ui.dev/r/radix-nova/toggle.jsonFree, no account or key. Use the command for your project's primitives: a radix-*, new-york or default style in components.json is Radix, a base-* style is Base UI. With the @beautiful-ui registry added, @beautiful-ui/<name> picks for you.
pnpm add @base-ui/react@^1 class-variance-authority@^0.7The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { Toggle } from "@/components/ui/notchset/toggle";
export function StreamLogs() {
const [stream, setStream] = React.useState(true);
return (
<Toggle variant="latch" description="LOGS" pressed={stream} onPressedChange={setStream}>
STREAM
</Toggle>
);
}variant–
"default" | "outline" | "latch"shadcn's two, plus the instrument latch.
size–
"default" | "sm" | "lg"shadcn's sizes.
pressed / defaultPressed / onPressedChange–
boolean / (pressed) => voidAs shadcn.
description–
stringThe latch's sub-label while off; it flips to onLabel while on.
onLabel–
stringDefault "ON".
node–
booleanThe latch's node above the key. Default true.
components/ui/notchset/toggle.tsx