Skip to content
Launch GitLab Knowledge Graph

Setup Storybook 7 with documentation add-ons

Setup Tasks

Core Setup

  • Install Storybook 7 latest
  • Configure Vite builder for fast refresh
  • Setup MDX for documentation pages
  • Configure TypeScript for stories

Add-ons to Install

  • @storybook/addon-essentials
  • @storybook/addon-a11y (accessibility testing)
  • @storybook/addon-interactions (interaction testing)
  • @storybook/addon-links
  • @storybook/addon-themes (theme switching)
  • chromatic (visual regression)

Documentation Structure

  • Introduction page
  • Getting Started guide
  • Design Principles
  • Component Guidelines
  • Contributing guide

Features

  • Dark mode toggle
  • Responsive viewport testing
  • Accessibility audit panel
  • Interactive props controls
  • Code snippet export

Deployment

  • Deploy to Chromatic for visual testing
  • Deploy static site to GitLab Pages
  • Auto-deploy on main branch

Acceptance Criteria

  • Storybook loads in <5s
  • All components documented
  • Accessibility checks passing
  • Visual regression baseline captured

Related Epic

&1

Edited by Administrator