Installation
Start a Tessera project, then add the components you want. Each one is copied into your project.
Create a project
Skip this if you already have one.
npm create @pixelscriptio/tessera@latestpnpm create @pixelscriptio/tessera@latestyarn create @pixelscriptio/tesserabun create @pixelscriptio/tessera@latestChoose the
tailwindpreset for Tailwind's colors and spacing, orunstyledfor a blank page to design on.Add a component
npx @pixelscriptio/tessera add Buttonpnpm exec tessera add Buttonyarn tessera add Buttonbunx @pixelscriptio/tessera add ButtonIt goes in
system/componentswith its docs file, and brings the components it uses. What it installed is recorded intessera.lock.json. If the name is taken it asks whether to replace yours or add the new one under another name (--replace,--as).--diffshows what would change, and--listshows what is here.Make the tokens fit
Before it writes a component,
addcompares the tokens the component uses with each design system in your project, and reports the ones that are missing or of the wrong type. Three ways to fix it:--fit addwrites the missing tokens, with values to start from, in a file of their own.--map color.action.primary.bg=color.brand.bgrewrites the component to use a token you already have.--fit setinstalls a whole token set (tokens:tailwind) as another design system.
Check it
npx @pixelscriptio/tessera checkpnpm exec tessera checkyarn tessera checkbunx @pixelscriptio/tessera checkAfterwards
addruns this on what it wrote.tessera a11y --system allsets up the generated accessibility tests, which cover the components in every design system.