Component workshops
Render each UI component on its own, one state per story, then reuse the stories as documentation and as tests.
How they work
Reaching an awkward UI state through the real app means logging in, navigating and faking the right data. A component workshop skips that: it renders one component in an isolated frame, and each “story” fixes its props and mocked data, so a button, a table with 1,000 rows or an error banner can each be opened directly. Storybook keeps an index of every story, and the same stories feed generated documentation.
Stories then become tests. A story can carry a play function that clicks and types like a user and then asserts on the result. Storybook’s Vitest addon turns every story into a Vitest test run in a real browser through Playwright; accessibility checks run axe-core against each story, and visual tests catch pixel-level changes through Chromatic, a cloud service from the Storybook team.
Storybook supports React, Vue, Angular, Svelte, web components and more. Ladle is a smaller, React-only alternative built on Vite. Stories in Storybook’s Component Story Format are plain ES modules, so other tools can import them as test cases.
Technologies
What all automated testing have in common →Sources
- Storybook docs: Why Storybook (isolated iframe, stories, CSF)
- Storybook docs: How to test UIs with Storybook (Vitest addon, Chromatic)
- Storybook docs: Interaction tests (play functions)
- Storybook docs: Vitest addon
- Storybook blog: Storybook 9 (accessibility with axe-core, visual tests with Chromatic; Jun 2025)
- Storybook docs: Component Story Format (an open standard based on ES modules)
- storybookjs/storybook on GitHub: supported frameworks
- Ladle docs: Introduction (React only, built on Vite)