question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can storybook display the sample code for the component?

See original GitHub issue

Hi storybook team,

I am wondering whether storybook support show the sample code on the storybook site for the component that display on page?

Like I write a Button component, and I want to show developers how to use the component?

import Button from '/components/Button';

<Button>This is a button.</Button>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

17reactions
Thamizhvaanancommented, Feb 14, 2019

Can storybook display the sample html code for the component???

4reactions
igor-dvcommented, Sep 14, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Build a simple component - Storybook Tutorials
Learn how to develop UIs with components and design systems. Our in-depth frontend guides are created by Storybook maintainers and peer-reviewed by the...
Read more >
In Storybook how can you display the full source of a ...
In Storybook how can you display the full source of a component in the "Show code" area of a story doc · Ask...
Read more >
Implementing a source code view in Storybook - krawaller
The SourcePanel component receives the addons channel , from which the sources will be emitted when rawSources.json has been fetched. Showing the source...
Read more >
Storybook - Display code for render props components
If you navigate to the “story” tab of the addons, at the bottom of the screen, you can see the correct code. Also,...
Read more >
Next-level component showcasing with Storybook controls
Storybook will detect the project type automatically when added to an existing project — in our case, it's a React project. As you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found