Which stories are rendered in Storybook autodocs when mixing tagged and untagged stories?
0 reputation · 03 May 2026, 01:20 UTC
Goal
Investigate how Storybook’s autodocs feature generates documentation pages when a single CSF file contains both stories that are explicitly tagged with autodocs and stories that are not.
Background
Autodocs combines story definitions, JSDoc/TSDoc comments, and inferred argTypes to build a documentation page for each component. The order and visibility of stories on that page are influenced by the presence of the autodocs tag on the component’s meta or on individual story exports.
Constraints & Uncertainty
When a component file mixes tagged and untagged stories, it is unclear whether the autodocs page:
- Includes all stories, or only those with the
autodocstag? - Orders them alphabetically, by file position, or by tag presence?
- Shows the state produced by a
playfunction or only the initialargs?
Specific Questions
1. Does the autodocs page display only stories that are marked with autodocs, or does it also list untagged stories when they appear in the same file?
2. If both tagged and untagged stories are present, what ordering algorithm does Storybook use to arrange them on the documentation page?
3. When a story has a play function that mutates state, does the autodocs rendering reflect that mutated state, or does it revert to the initial args?