Token compose
A seeded composer builds small card layouts from a closed vocabulary: six spacing steps, five radii, six type sizes, three layouts and a palette sampled from pastelColour plus ink. A pure validateComposition() rejects any value outside those sets, naming the path and the rule. The demo generates 6 to 1000 compositions, runs the validator over every value and reports how many fall outside the system, and an inject button swaps in an off-token value to show it being rejected. The validator checks set membership only; it does not judge taste or contrast.
- Seeded PRNG
- Validation
- pastelColour
- Design Tokens
token-compose
Weekly summary
Nothing here is off the scale.
New arrival
Built only from what the system allows.
Almost there
Same tokens, different arrangement.
Field notes
Small steps, one at a time.
Showing the first 4 of 24. The validator ran over all 24.
24 generated · 312 values checked · 0 outside the system
Try to break it
Takes the first composition and swaps one value for something off the scale. Each press tries a different kind.
The closed vocabulary
- Spacing (px)
- 4812162432
- Radius (px)
- 06121624
- Type (px)
- 121416202432
- Palette (6 from pastelColour, plus ink)
- 140 165 254254 165 140140 254 254254 254 140209 199 186174 245 2205 5 5
- Layouts
- stacksplitgrid
- Blocks
- 1234
Titles use 20, 24, 32; body text uses 12, 14, 16.
Accessibility
Works with
- Cursor
- Reacts to where the pointer is, not just whether it's over the element.
- Touch
- Follows your finger while it's down, then settles a moment after you lift.
- Keyboard
- Focus lights it up the way the cursor does. Every action has a key.
- Reduced motion
- Nothing moves or springs. Colour still answers, without drifting.