Resources
Resources
Everything in this library is generated from the project, so the downloads below are the real files, not exports prepared for the documentation.
Token export
The JSON merges the primitive, semantic (base, dark, light), component, variant and motion-mode files. The CSS is the compiled stylesheet. Both are regenerated by npm run tokens. System Studio also exports your current configuration with every resolved value.
CSS variables
One variable per token, prefixed --ds-. Each tier references the one below it, so a change flows upward.
:root {
--ds-prim-color-lavender-400: #B9A6FF; /* primitive */
--ds-color-accent-fill: var(--ds-prim-color-lavender-400); /* semantic */
--ds-button-primary-bg: var(--ds-color-accent-fill); /* component */
}
:root[data-accent="ember"] {
--ds-color-accent-fill: var(--ds-prim-color-ember-400); /* variant (generated) */
--ds-color-accent-on-fill: #0C0C0C; /* derived: ink, white or black, at least 4.5:1 */
--ds-color-accent-readable: #FF6A2B; /* derived: accent text on dark surfaces */
}Component examples
Button
Triggers an action or navigates. Hierarchy, variant and size are properties; states are driven by the user and the platform.
Card
Groups one subject (a project, a note, a summary) on a bounded surface.
Navigation
The persistent header: brand, primary links and a slot for controls.
System Studio
The visual editor for the live site: pick a category, select real components with Inspect Mode, change the system that renders them, reset or export.
Implementation notes
Add or change a token
- Edit the right file in
src/tokens(primitive, semantic base, dark, light or component). - Run
npm run tokens; a broken reference or a theme missing a role fails the build. - Run
npm run tokens:checkafter any colour change.
Add a variant
- Add
<attribute>.<value>.<token path>tovariants.tokens.json. - Add the value to
OPTIONSinsrc/studio/config.ts(and a label). - For button and card, the per-instance
data-variantselector is generated automatically.
Add a component
- Define a model in
src/system/components(props, validation, markup) and render it from an Astro component. - Give its parts
data-partand the rootdata-component; add an entry tosrc/system/registry.ts. - Add its tokens to
component.tokens.json; document it with a playground that renders the same model.
Honest scope: three components are documented. Inputs, checkboxes, radio buttons, switches, badges, tabs, tooltips, dropdowns and dialogs are proposed and have no documentation page.