Shelf is open source and in early preview
Shelf
Get started

For AI agents: the documentation index is at /llms.txt, and any docs page is available as Markdown by appending .md to its URL.

Toggle

A two-state button with default and outline variants.

When to use

Use when
A single on/off button in a toolbar, such as bold.
Avoid when
The setting is part of a form; use Switch or Checkbox.

Installation

The source lands in src/components/ui/toggle.tsx, along with any Shelf items it builds on, and .shelf/lock.json records what was installed. It's yours to edit.

Usage

Built on

Packages
@base-ui/react, @stylexjs/stylex
Shelf items
foundations, utils
Accessibility
Focus, keyboard, and ARIA behavior come from Base UI.
Figma
Optional native Figma library. See Designers.