Puzzle Pieces
Beautifully-behaved UI components for the Puzzle framework. Tailwind-styled, accessible, morph-aware — and copied into your app, not installed from npm.
Why copy-in?
Puzzle compiles .pzl single-file components, and .pzl files ship as source, so Puzzle Pieces embraces that: every piece is source you copy into app/components/ui/. Your build compiles it, your Tailwind scan picks up its classes, and the code is yours to restyle and rework — for Puzzle it's the structurally correct model.
Quick start
1. Copy a piece in
The Puzzle CLI copies the piece (and anything it depends on) into your app. Your first add also drops the pieces.css design tokens into app/styles/.
puzzle add piece button
2. Wire up the design tokens
Every piece styles itself through semantic utilities (bg-surface, text-ink, border-border, bg-brand…) generated from one token block — restyle everything by editing the values.
/* app/styles/styles.css — after @import "tailwindcss"; */ @import './pieces.css';
3. Use it
import Button from '@/components/ui/Button.pzl';
<Button variant="primary" @press={ save }>Save changes</Button>
Conventions
Config-first APIs (props in, value-first callbacks out), controlled components (the parent owns state), full keyboard and ARIA behavior in every piece, and no colors outside the token set. Each file's header comment documents its props, callbacks, and usage examples — the docs live with the code you copied.