Contributing
Add to the Design System
No code required. Add guidelines, assets, or tokens via PR. The build check runs automatically.
Contributing to the Design System
How to Add Design Tokens
- Edit the relevant JSON file in
tokens/— follow W3C DTCG format:{ "token-name": { "$value": "...", "$type": "color", "$description": "What this token is for" } } - Run
npm run buildto regenerate outputs - Run
npm run validateto check for broken references - PR with before/after screenshots if the change is visual
How to Add Examples (Good/Bad)
- Create a new
.mdfile inexamples/good/orexamples/bad/ - Follow
examples/_template.mdformat:- What makes it good/bad (specific tokens or rules referenced)
- For bad examples: the fix (what it should look like instead)
- Screenshots go alongside the markdown file
How to Add Foundation Docs
- Edit the relevant
.mdfile infoundations/ - Keep token values in sync — if a value changes, update both the JSON token and the markdown doc
- Include rationale (“why”) not just specification (“what”)
- If deviating from Patina, add a “Deviation from Patina” section explaining why
How to Add a Category Guide
- See
categories/README.mdfor which folder to use - Copy
categories/_guide-template.md→categories/{your-medium}/guidelines.md - Fill in each section: mood/style, specs, token usage, do’s/don’ts
- Add reference images in
categories/{your-medium}/assets/(see asset format guide below) - Include at least 2 good and 2 bad examples with screenshots
- Reference specific tokens from
tokens/by name — don’t hardcode color or size values - Open a PR
Asset Format Guide
| Type | Preferred Format | Max Size | Naming |
|---|---|---|---|
| Icons & illustrations | SVG | — | icon-{name}.svg |
| UI screenshots | PNG | 2x resolution, max 2400px wide | {good\|bad}-{description}.png |
| Photos & mood boards | WebP or JPG | Max 1600px wide, <500KB | photo-{description}.webp |
| Diagrams | SVG or PNG | — | diagram-{description}.svg |
Naming: lowercase, hyphens, no spaces. Prefix example images with good- or bad-. Keep names descriptive (good-hero-dark-teal-bg.png, not screenshot1.png).
Review Process
- All changes via PR
- Visual changes require before/after screenshots
- Token changes require
npm run buildoutput committed (inbuild/dist/) - Foundation/category changes require at least 1 reviewer
Deviation Protocol
If a design decision differs from Patina’s implementation:
- The foundation doc MUST include a “Deviation from Patina” section
- Explain why the deviation is necessary
- Deviations should be rare — Patina is battle-tested with 60+ components
Justified deviations: marketing-specific needs (display font, photography style), ad templates, physical goods specs.
Unjustified deviations: changing brand teal, using a different component library, different dark mode strategy.
Running the Build
npm install
npm run validate # check token JSON integrity
npm run build # generate build/dist/ outputs