Get Started
Contributing
How to work on @oscarkalid/ui.
Getting set up
Terminal
Scripts
Where things live
Workspace
The two that matter most
Nothing defines its own values
Colours, spacing, radii and transitions all come from packages/ui. A hex code, a px value or a transition: declaration in the workbench belongs in the design system as a token.
TypeScript
Write each CSS property exactly once per element
Never set a base value in the class list and then override it conditionally.
TypeScript
It never throws. The base value wins and the conditional one never appears.
Design system rules
- Token layers. Primitives (--blue-500) are the raw palette. Components never reference them. Semantic tokens (--surface-raised, --accent) name a role and are the only thing components use.
- Themes are data. A theme is a set of semantic token values on [data-theme]. Adding one must not require touching a component.
- Transitions are tokens too. No component writes 300ms ease-in-out.
- Import from the package root, never from @oscarkalid/ui/src/....
- WCAG 2.2 AA. A component with a broken focus ring is not finished.
- A component ships with its page. A new component needs a page in the workbench, with the source visible.
House style
No em dashes anywhere: UI copy, code, comments, docs, commit messages, PR bodies. Use commas, colons or parentheses.
Comments explain the reasoning behind the code.
Before you open the PR
Terminal
Last updated: 12 August 2026