Guides

Contributing

How a token or component gets into Flint, and what has to pass before it ships.

The path for anything new

  1. File an ASDS ticket describing the need.
  2. Reuse first. Build only when no token or component fits.
  3. Tokens first. Add or change tokens before touching a component.
  4. Every state, with an accessibility note.
  5. Add it to the workbench (docs/src/workbench/benches.jsx) and walk it: every state, light and dark, both densities, keyboard only.
  6. Document it here: usage, style, code and accessibility.
  7. Release: bump the version, add a changelog entry, tag it.

What the build checks

CheckFails when
ContrastA text pair drops under 7:1, or a control edge, focus ring or chart color under 3:1, in either mode.
UsageA control is drawn with a decorative border, or a density shrinks a control or target.
ParityCSS, MUI, shadcn or Swift lands on a value tokens.json didn't give it, or the MUI theme hardcodes a color.
Docs and workbenchAny axe violation on any page, light or dark (workbench pages at both densities); a blocked script or style; sideways scroll at phone width; focus not landing and holding on headings; a workbench Hover row that looks like Default; or a semantic or component token with no row in the docs.

Run the checks

Terminal
npm run build          # tokens, contrast, usage, parity
cd docs && npm ci && npm run build && npm run verify

Versioning

Flint uses semver, separate from the apps that use it. A new token or component is a minor. A value fix is a patch. A rename or removal is a major. Deprecated tokens keep working for one minor release, then go in the next major.