packages/collakit carries the design tokens of the core for apps. It is generated, so an app that reads it looks like Collabase. For the product behind it, see Collakit.
Generate it
The generator readssrc/app/tokens.css, src/app/themes.css and the role names from src/app/roles.css.
Write the package
Check that the package is current
npm run check, so a token change without a regenerated package does not pass.
The generator stops when the core stylesheet lacks a required token, such as --surface-page, --ink, --accent-brand or --control-height, or when a preset has no dark block.
The contract
A name inCONTRACT.md is a promise. It keeps its meaning until a major release of Collakit. Do not edit the file by hand.
- Apply a preset as
theme-{name}on the body. - Add a token or role to the core first, then regenerate. The package never defines names of its own.
- The package imports nothing from the app.