Interoperability — DSDS 0.23.1
Every format DSDS is built to sit alongside — DTCG, CEM, CSF/Storybook, source files, tests and lint rules, standards, design tools and packages — with the field that points at each and a worked example.
No open standard covers design-system documentation end to end. The formats that do exist each cover one layer well: DTCG owns token values, CEM owns a component's generated API, CSF owns a story, a test runner owns whether a rule actually holds.
DSDS sits above them and documents meaning and usage. It is deliberately not a second copy of what those formats already own.
If another format owns a fact, DSDS points at it rather than restating it. A pointer can go stale in exactly one way — the target moves — and
That is why a token entry has a
#
The mapEvery integration below is a field that exists today, not a plan.
| Layer | Format it interoperates with | The DSDS field |
|---|---|---|
| Token values, types, aliases | DTCG (W3C Design Tokens) | A token entry's |
| Component API contract, already generated | Custom Elements Manifest (CEM), or any standard contract document | A component's |
| Component source, per platform | A component's | |
| Stories and live demos | Component Story Format (CSF), Storybook, or an equivalent | A |
| Whether a guideline actually holds | A test or lint rule — vitest, axe-core, stylelint, ESLint | A guideline's |
| Why a guideline exists | WCAG, ARIA APG, MDN, an internal RFC | A guideline's |
| Design artifacts | Figma or another design tool | A |
| Distribution | npm, or any package registry | A component's |
| Editor validation of the DSDS file itself | JSON Schema draft 2020-12 | The document's own |
| Anything not listed | Any vendor or tool |
#
Tokens — DTCGA token entry documents what a token is for. Its value, type, and aliases stay in the DTCG file, and
kind: token
id: color.action.primary
name: Primary action color
description: The fill behind the single highest-priority action on a surface.
tokenType: color
source: ./color-action-primary.tokens.json
The
Nested groups, group-level
A theme is the same move one level up:
#
Component APIs — CEM, source files, and contractsTwo fields, one step apart in the same pipeline. A component can use either, both, or neither.
sourceFiles points at the real source a generator reads — one entry per platform.specs points at the already-generated contract document, so a consumer doesn't have to re-derive it.
sourceFiles:
- platform: react
file: ./src/Button.tsx
specs:
- href: ./contracts/button.contract.json
role: DS Contracts
A
kind: system
id: acme-ui
name: Acme UI
description: Acme's component library.
metadata:
sourceRoot: ../acme-ui # a path next to these docs, or a URL
DSDS does not parse or validate what
CEM is a community project maintained at webcomponents/custom-elements-manifest, not a W3C specification — worth stating because it sits next to DTCG on this page, and DTCG is a W3C Community Group report. Neither is a W3C Recommendation; both are widely enough adopted to point at.
#
Stories — CSF and StorybookA story is an example, and DSDS treats it as one.
refs:
- href: https://storybook.org/ds/button
rel: demo
role: hosted docs
- href: ./stories/button.stories.tsx
rel: demo
role: CSF story source
note: Component Story Format (CSF3) - the source the hosted docs above are built from.
Point
examples:
- title: Loading state announces itself
ref:
href: ./stories/button.stories.tsx#Loading
rel: demo
#
Tests and lint rulesThis is the integration that makes a guideline falsifiable rather than decorative. A guideline that claims automated verification MUST say what runs it —
- level: must
statement: Every icon-only button MUST have an accessible name.
checkedBy: automated
checks:
- href: ./tests/button.a11y.test.ts
role: test
note: vitest + axe-core
#
Standards and evidence- level: must
statement: A focus indicator MUST remain visible for keyboard users.
evidence:
- href: https://www.w3.org/WAI/WCAG21/Understanding/focus-visible.html
role: WCAG 2.2 SC 2.4.7 (AA)
A pointer in
#
Design tools and packagesrefs:
- href: https://figma.com/file/…/Button
rel: design
- href: npm:@org/ds-react
rel: source
imports:
- platform: react
code: "import { Button } from '@acme/ui';"
package: "@acme/ui"
Figma node ids, Tokens Studio metadata, and anything else tool-specific belong in
#
The DSDS file itselfDSDS is JSON Schema draft 2020-12, so a DSDS base document is a first-class citizen in any editor that resolves
$schema: https://designsystemdocspec.org/v0.23.1/dsds.bundled.yaml
schemaVersion: "0.23.1"
The bundle ships as both YAML and JSON (
This site's own pages carry
#
Anything not on this list$extensions:
com.acme.designops:
figmaNodeId: "1:234"
A conforming consumer MUST preserve
#
What DSDS won't doWorth stating plainly, because it's the boundary that keeps the format small:
- It won't restate a component's props, types, or defaults. That's what
sourceFiles andspecs are for. Hand-typed API tables are the single most common source of documentation drift. - It won't hold a token's value. DTCG owns that.
- It won't parse or validate what a pointer points at. DSDS checks that a relative target exists on disk (
DSDS-11 ); reading inside it is the consuming tool's job. - It won't invent a vocabulary another standard already has. RFC 2119 for requirement levels, JSON Schema for structure, schema.org for page identity.
Every worked pair lives in