@lakea/design-system
Purpose
Section titled “Purpose”@lakea/design-system is the single source of styling for the Lakea monorepo. It provides:
- Tokens — Colors, spacing, radius, shadows, transitions
- Components — Layout primitives, atoms, and molecules
- Utilities — Class name helpers
This is the only package that uses Tailwind CSS directly. Other packages compose these components or use the exported tokens.
Structure
Section titled “Structure”packages/design-system/src/├── styles/│ ├── tokens.css # CSS custom properties│ └── index.css # Tailwind directives├── tokens/│ └── index.ts # TypeScript token exports├── utils/│ └── cn.ts # clsx + tailwind-merge└── components/ ├── layout/ │ ├── Stack.tsx │ └── Container.tsx ├── atoms/ │ ├── Button.tsx │ ├── Text.tsx │ ├── Badge.tsx │ └── Link.tsx └── molecules/ └── Card.tsxIn Apps
Section titled “In Apps”Import components and the styles CSS:
import { Stack, Card, Text, Button } from '@lakea/design-system';import '@lakea/design-system/styles.css';
function MyComponent() { return ( <Stack gap="md"> <Card> <Text variant="h2">Title</Text> <Text color="muted">Description</Text> </Card> <Button variant="primary">Action</Button> </Stack> );}In Other Packages
Section titled “In Other Packages”Import tokens for inline styling:
import { colors, radius, shadows } from '@lakea/design-system/tokens';
const style = { backgroundColor: colors.slate[800], borderRadius: radius.lg, boxShadow: shadows.md,};Components
Section titled “Components”Layout
Section titled “Layout”| Component | Description |
|---|---|
Stack | Flex container with gap, direction, alignment |
Container | Max-width centered container with padding |
| Component | Description |
|---|---|
Button | Variants: primary, secondary, ghost |
Text | Typography with variants (h1-h4, body, caption) and colors |
Badge | Status badges: default, success, warning, error |
Link | Styled anchor with variants |
Molecules
Section titled “Molecules”| Component | Description |
|---|---|
Card | Surface with border, supports Card.Title and Card.Body |
Tokens
Section titled “Tokens”Colors
Section titled “Colors”colors.cosmic[500] // '#5a6cf4' - primary brandcolors.slate[800] // '#1e293b' - surfacecolors.slate[100] // '#f1f5f9' - textcolors.slate[400] // '#94a3b8' - muted textSpacing
Section titled “Spacing”spacing[1] // '0.25rem'spacing[2] // '0.5rem'spacing[4] // '1rem'spacing[8] // '2rem'radius.sm // '0.25rem'radius.lg // '0.5rem'shadows.md // box-shadow valuetransitions.duration.normal // '150ms'CSS Variables
Section titled “CSS Variables”All tokens are also available as CSS custom properties:
:root { --ds-color-cosmic-500: #5a6cf4; --ds-color-background: #0a0f1a; --ds-color-surface: #1e293b; --ds-color-text: #f1f5f9; --ds-color-text-muted: #94a3b8; --ds-space-4: 1rem; --ds-radius-lg: 0.5rem;}Design Principles
Section titled “Design Principles”- Tailwind is internal — Only this package uses Tailwind; it’s an implementation detail
- Composable — Components are building blocks, not complete layouts
- Consistent — All colors, spacing, and typography come from tokens
- Accessible — Components include proper ARIA attributes