Recipes
Practical how-tos for wiring `@takazudo/zdtp` into a host app.
These are small, copy-pasteable recipes for common integration tasks against
@takazudo/zdtp as currently exported. Each recipe stands
on its own — start with whichever scenario matches what you are doing right
now and follow the cross-links into the reference pages
when you need the full API surface.
When to use which recipe
- Wiring a fresh palette + semantic table for a new project → Custom color cluster.
- Adding or removing token tabs, coining custom group ids, or controlling group order → Custom token manifest.
- Add a secondary Color tab or leave it out → Secondary cluster: configure or disable.
- Wire the apply-to-disk pipeline into a non-Astro dev script → Apply pipeline setup.
- Defer a large preset library out of the SSR config blob → Lazy color presets.
- Set up a 2-tier raw + semantic token system with
referencesTier→ Multi-tier tokens. - Add a standalone palette tab with OKLCH colour groups and WCAG contrast
checking (no
colorExtras) → Grouped palette tab.
💡 Tip
Every snippet on these pages compiles against the package’s current public exports. If one ever drifts, file an issue — the recipes are the canonical “does this still work” smoke test for the contract.