Is it possible to hide stories in Storybook on the sidebar? But still be able to access them by URL?

I'm trying to do some stuff in Storybook. I have a component called Button and there are too many stories on the sidebar.

enter image description here

Is there a way to be able to "hide" the stories on the sidebar but having the stories still loading in? So basically for example if I could hide the "With Text Only" story but have the story is loaded in so you could still access it at the url "" or access it using addon-links.

I'm unsure if this is possible or not and would really appreciate any help, thank you!

1

1 Answer

You can add a style with display: none for the story id in manager-head.html. This will hide the story link from side panel(but doesn't remove it from accessing it from URL).

Each side panel item has the css id same as the story id. So if you want to hide a button/withTextOnly story then below style in .storybook/manager-head.html will hide it.

<style>#components-button--with-text-only { display: none;}</style>

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like