storybook

Storybook create a hidden story to be included in mdx docs


I'm creating documentation for a complex component in Storybook and would like to create a working example inside an mdx file. To do this my approach is usually to integrate a story into my mdx using the Story tag. Is there a way to create a story to bo integrated into my mdx but without it being visible with the other stories in the sidebar?

I am using storybook 7 and my components are made with vue (although I think this is irrelevant).


Solution

  • For anyone looking for a solution to this question, I ended up with the followind solution:

    I have added a display:none rule to sidebar buttons (by their id) in the manager-head.html file in the .storybook folder.