Storybook is not preinstalled in
apps/web. It’s an opt-in addition — set it up with the official guide below, then follow the conventions on this page so stories sit naturally next to your components.Setup
Storybook is stack-agnostic and works with the Vite-basedapps/web out of the box. Initialise it from the web app:
Conventions
Keep stories where Ship keeps components:- shadcn/ui primitives —
src/components/ui/(e.g.button.tsx,input.tsx,card.tsx) - Shared app components —
src/components/
.storybook/main.ts
Example: a Button story
Colocate the story with the primitive and import it through the@/ alias. Mirror the component’s real variants — Ship’s Button exposes default, destructive, outline, secondary, ghost, and link, with default, sm, lg, and icon sizes:
src/components/ui/button.stories.tsx
