Opinion requested: should stories only be about different args for 1 component #32187
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @thobas-dnvgl! I'm Dosu and I’m helping the storybook team. It's totally valid to have both single-instance stories (showing one variant of a component with specific args) and composite/grid stories (showing multiple states together) in Storybook. The most common and recommended pattern is to use single-instance stories for each variant, which works best with Storybook's controls, documentation, and automated testing features. This keeps your stories focused, makes the ArgsTable meaningful, and helps with maintainability and discoverability [docs]. However, composite/grid stories are also supported and can be useful for visual comparison or design review, especially when you want to see many states at once. Storybook maintainers have said it's fine to have a story that renders multiple variants, and recent versions even let you tag these stories so they don't clutter the sidebar or test runs [discussion]. If you keep the grid stories, consider tagging them (e.g., To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Ok AI, you win, this is actually a good answer. |
Beta Was this translation helpful? Give feedback.
Hi @thobas-dnvgl! I'm Dosu and I’m helping the storybook team.
It's totally valid to have both single-instance stories (showing one variant of a component with specific args) and composite/grid stories (showing multiple states together) in Storybook. The most common and recommended pattern is to use single-instance stories for each variant, which works best with Storybook's controls, documentation, and automated testing features. This keeps your stories focused, makes the ArgsTable meaningful, and helps with maintainability and discoverability [docs].
However, composite/grid stories are also supported and can be useful for visual comparison or design review, especially when you want to s…