Explore how SpaceZero's design system uses Tailwind CSS with strict constraints to maintain consistency across micro-apps.
SpaceZero's design system is built on a simple principle: constraints create consistency.
Instead of allowing arbitrary values, SpaceZero defines a limited set of design tokens:
All tokens live in src/index.css as CSS custom properties:
:root {
--scaling-5: 1.25rem;
--action: #006198;
}
Tailwind config is a thin mapping layer that references the tokens via var():
spacing: {
5: 'var(--scaling-5)',
}
Font sizes are intentionally not overridden — they use the standard Tailwind classes listed above.
Components are built as TSX sub-components that encapsulate all styling:
// Button.tsx
const BASE_BTN = 'inline-flex items-center justify-center py-3 ...';
Pages compose components only — no inline Tailwind classes.
To customize for your app, only edit src/index.css:
:root {
--action: #8b5cf6; /* Your brand color */
--surface: #0f172a; /* Your background */
}
That's it — your entire app reflects the new brand.