Design System
Tokens, typography, color, and spacing decisions that drive Portfolio OS across web and docs surfaces.
Overview
The design system codifies colors, spacing, typography, and interaction patterns shared across the docs, site, and dashboard apps. It is implemented in Tailwind (docs) and CSS variables (site/dashboard) so UI teams can ship consistently without rewriting tokens per surface.
Tokens
Design tokens live inside apps/docs/styles/globals.css and packages/ui/tailwind.config.js. They expose semantic names instead of hex values:
--color-background,--color-card,--color-ring--radius-sm,--radius-md,--radius-lg--color-sidebar-*for navigation chrome
Use semantic tokens inside components instead of hard-coded colors to keep dark mode parity.
Typography
Inter is the primary font across apps. In docs, typography is wrapped with the shared Typography component which applies prose styles, list markers, and code block formatting. For site/dashboard surfaces, typography utilities live in packages/ui and map to Tailwind presets.
| Use Case | Utility | Notes |
|---|---|---|
| Page titles | text-3xl font-semibold | Mirror docs <h1> styling |
| Section headings | text-xl font-semibold | Align with ## Overview sections |
| Body text | text-sm text-muted-foreground | Ensures contrast in both themes |
Interaction & Components
- Radix primitives ensure accessible dialogs, sheets, and dropdowns.
class-variance-authorityenforces consistent variant naming (e.g.,variant="primary"vssize="lg").- Hover/focus states should use
ringutilities andtransitionhelpers for smooth feedback.
When introducing a new component, update:
- The component implementation (
packages/uior app-specific directory) - Storybook story (
apps/site/components/**/Component.stories.tsx) - Documentation entry (usually
docs/component-library)
Resources
This shared system allows design updates (colors, typography, spacing) to propagate instantly to every app without manual refactors.