Searching Puzzle Pieces

Type to search Puzzle Pieces.

Toggle

A two-state aria-pressed button for tool states like bold or italic — not a call to action. Controlled: the parent owns pressed and flips it from @change.

Bold: on · Italic: off

Installation

Copy the piece into your app — it compiles with your build and the code is yours:

puzzle add piece toggle

Requires the pieces.css tokens merged into your app styles (see Introduction).

Usage

import Toggle from '@/components/ui/Toggle.pzl';
<Toggle variant="outline" pressed={ bold } @change={ setBold }>B</Toggle>

Variants

Sizes