Architecture Overview
Static UI is a multi-framework UI component library built on a modular, Turborepo-based monorepo.
Core Principles
- Source of Truth: All components are defined once in
packages/uiusing React. - Code Generation: The registry and core packages generate framework-specific output.
- Copy-Paste: Components are designed to be copied into consumer projects, not installed as runtime dependencies.
- Unstyled & Accessible: Built on
@base-ui/reactfor accessible, unstyled primitives.
Package Architecture
static-ui/ ├── packages/ │ ├── ui/ # React component source of truth │ ├── cli/ # CLI tool (init, add, theme commands) │ ├── core/ # Schemas and code generators │ ├── registry/ # Component registry for distribution │ └── themes/ # Theme definitions (CSS variables) ├── apps/ │ ├── www/ # Documentation website │ └── storybook/ # Component development environment └── e2e/ # Playwright end-to-end tests
Data Flow
- Components are authored in
packages/ui/src - Registry metadata is defined in
packages/registry/registry.json - Build script reads UI source + metadata to produce
dist/index.json - CLI fetches registry and installs components into consumer projects
- Consumer projects use components with framework-specific adapters