#Is there no `initialOpen` for `parameters.docs.source` anymore?

2 messages · Page 1 of 1 (latest)

velvet latch
#

I'd like to have a stories source code opened by default instead of clicking Show Code in the bottom right of the story. Isn't that possible anymore?

silent tree
#

We renamed some of the props and parameters pertaining to the doc blocks, to have a consistent API.

parameters.docs.canvas.sourceState = 'shown' is what you need.

https://storybook.js.org/docs/react/api/doc-block-canvas#sourcestate

Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and documentation. It’s open source and free.