Storybook
The Storybook app lives in apps/storybook and showcases the shared UI primitives from packages/frontend-common. It uses the Vite-powered Storybook runtime and mirrors the frontend theme setup so components render exactly as they do in the app.
Run Storybook
From the repo root:
bash
bun run storybook:devStorybook runs on http://localhost:6006 by default.
Alternative (from anywhere in the repo):
bash
bun --filter=storybook-app devBuild and preview
bash
bun run storybook:build
bun run storybook:previewThe preview command serves the static output from storybook-static.
Styling and theming
- Tailwind v4 is enabled in
.storybook/preview.cssand scanspackages/frontend-commonfor utility classes. - Shared theme variables come from
packages/frontend-common/styles/theme.css. - Theme switching (light/dark) is wired to the Storybook toolbar and applied to both the docs and iframe previews via
.storybook/preview.tsxand.storybook/preview-head.html.
Adding stories
- Place stories in
apps/storybook/srcusing*.stories.tsxor*.mdx. - Use components from
frontend-commonto keep UI primitives consistent. - Keep stories focused on a single component or interaction state.
Demo
A hosted demo is available at: