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.

implemented

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.

CSS
: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.

Documentation and playground

Card

Groups one subject (a project, a note, a summary) on a bounded surface.

Documentation and playground

Navigation

The persistent header: brand, primary links and a slot for controls.

Documentation and playground

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

  1. Edit the right file in src/tokens (primitive, semantic base, dark, light or component).
  2. Run npm run tokens; a broken reference or a theme missing a role fails the build.
  3. Run npm run tokens:check after any colour change.

Add a variant

  1. Add <attribute>.<value>.<token path> to variants.tokens.json.
  2. Add the value to OPTIONS in src/studio/config.ts (and a label).
  3. For button and card, the per-instance data-variant selector is generated automatically.

Add a component

  1. Define a model in src/system/components (props, validation, markup) and render it from an Astro component.
  2. Give its parts data-part and the root data-component; add an entry to src/system/registry.ts.
  3. 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.

Beyond Design System v0.4.0Human-led. AI-assisted. System-driven.