@ris-ui/tokens
v0.1.0
Published
Design tokens for ris-ui (W3C format), built into CSS variables and a Tailwind v4 theme.
Maintainers
Readme
@ris-ui/tokens
Design tokens in the W3C format (src/), built with Style Dictionary into:
| File | Use |
| --- | --- |
| @ris-ui/tokens/tokens.css | CSS variables: everything on :root / [data-theme="light"], semantic and component tokens again on [data-theme="dark"] |
| @ris-ui/tokens/theme.css | Tailwind v4 theme (imports tokens.css), the dark variant and the focus-ring utility |
| @ris-ui/tokens/tokens.json | Flat list with light and dark values, for docs and tooling |
@import "tailwindcss";
@import "@ris-ui/tokens/theme.css";Layers: src/primitives (raw values), src/semantic/{light,dark}.json (roles; the only layer that changes with the theme), src/component (only where a component needs its own value).
Tailwind classes: bg-page, text-primary, text-fg-brand, border-default, inset-ring-default, outline-focus, p-16, gap-8, h-control-md, rounded-lg, text-md, text-heading-lg, text-heading-fluid-lg, font-medium, shadow-md, duration-fast, ease-standard. Tailwind's default colors, radii, shadows, type scale and 4px spacing multiplier are removed, so only token values produce classes.
Build: npm run build -w @ris-ui/tokens.
Install
npm install @ris-ui/tokensLicence
MIT.
