Schemas
Every component and token as a file a program can read
Generated on every build, so they always match what the package ships. For one component, use the For agents button on its page.
Where they are
| What | Where |
|---|---|
One component | https://rift-ds.com/schema/components/<slug>.json |
The index of every component schema | https://rift-ds.com/schema/components.json |
The meta-schema each component schema validates against | https://rift-ds.com/schema/component.schema.json |
The meta-schema the index validates against | https://rift-ds.com/schema/components-index.schema.json |
The tokens, one file per theme and mode (DTCG) | https://rift-ds.com/schema/tokens/<theme>.<mode>.tokens.json |
The tokens resolved per theme, in the package | rift-ds/tokens/values |
The meta-schema the token values validate against | https://rift-ds.com/schema/token-values.schema.json |
curl https://rift-ds.com/schema/components/button.json | jq '.exports[0].props[] | {name, typeKind, values, default}'| Field | What it holds |
|---|---|
name | The prop name. Native attributes pass through every component and are not listed; only the component's own props are. |
type | The resolved TypeScript type as text, literal unions expanded. |
typeKind | The shape of the type, so a reader can branch without parsing TypeScript: enum, primitive, array, function, reference or other. |
values | The members of a literal union, present exactly when typeKind is enum. A prop typed through a named alias gets its members here too. |
required | Whether the prop must be passed. |
description | The prop's JSDoc description, present on every own prop by build rule. |
default | The default as a value: a number, a boolean, null, an enum member, or a string on a prop typed as a plain string. |
defaultExpression | Any other default as source text: a function, a computed number, a reference to another prop, or a string on a prop with a wider type. |
deprecated | Set when the prop carries a deprecation: the replacement guidance. The prop still works, because the published API only grows. |
Design tokens
In code, rift-ds/tokens/values gives every token's value for every theme in light and dark.
import { tokenValue, THEME_IDS } from 'rift-ds/tokens/values';
tokenValue('--color-action-primary-bg', THEME_IDS[0], 'dark');For design tools such as Figma, Style Dictionary or Tokens Studio, the same tokens are DTCG files under /schema/tokens/, one per theme and mode, with semantic tokens kept as aliases of their primitives.