Option to turn off `Show code` & `Hide code` in the preview panel
See original GitHub issueIs your feature request related to a problem? Please describe
- I’m creating ‘Design Tokens’ documentation page on Storybook.
- I’m creating a story representing a group of ‘Design tokens’, which isn’t the best looking code to preview, as it isn’t useful to the consumer to read or consume. See below:
E.g.
() => { return ( <div css={{ maxWidth: 1080, margin: '20px auto' }}> <Table heads={Heading} rows={Object.keys(weight100).map((key) => ({ token:
borders.100.${key}, value: weight100[key], example: weight100[key], }))} columnDecorations={{ example: DecorateSwatch, token: DecorateToken, }} showPagination={false} /> </div> ); }
- On the ‘Docs’ tab, I’m displaying the output, however consumers can expand the ‘show code’ panel, and view the setup code [see above], which isn’t required nor helpful to the consumer of the design system.
- I want to hide the ‘show code’ & ‘hide code’ functionality in this instance
Describe the solution you’d like
Configuration to hide this panel:

Describe alternatives you’ve considered
Are you able to assist to bring the feature to reality? Most likely not, happy to try.
Any help will be much appreciated.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Removing the file preview on the right side of the editor in VS ...
Show activity on this post. Go to Preferences->Settings Under text-editor dropdown go to Minimap and there uncheck the enable of a minimap. ...
Read more >How to hide minimap (preview bar) in visual studio code?
Go to View menu · Check or uncheck to show or hide minimap.
Read more >Live Preview Window - Show/Hide? | Apple Developer Forums
Xcode Editor Menu has a Canvas option as well to toggle on or off. Posted 2 years ago by. Claude31.
Read more >Visual Studio Code User Interface
You can also hide the Menu Bar on Windows and Linux with the View > Toggle Menu Bar command. This command sets window.menuBarVisibility...
Read more >Editor basics | PhpStorm Documentation - JetBrains
In the editor, press Ctrl+Shift+F12 . PhpStorm hides all windows except the active editor. You can maximize a split screen as well. In...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll leave this here in case it can be of help to anyone else, because I’ve been unable to find anything about this.
If you don’t want the “Show/Hide Code” button to appear, just don’t wrap your
<Story>
in a<Canvas>
element.Then what renders is just your component without the border/shadow/button/etc., and it is still accessible from the left nav.
Right, wrong, or otherwise, this has worked for me!
My current fix for this is:
@shilman Thanks but your link now returns a 404