Code blocks

Display code in your documentation.

You can embed a Storybook canvas from a URL.

Embed Storybook - menu

Embed a Storybook URL

Display content from a Storybook URL. This URL can be public, private, or behind a VPN. You must be logged in with Storybook before it will show up in the documentation.

  1. Select Storybook from the block menu.
  2. Enter the URL of a Storybook story and click Embed URL.
  3. The story will be displayed — click on the block to open the story in a new window.
  4. You can optionally resize the container vertically by using the resize handle (accessible on hover).
Embed Storybook - empty block

Add a custom Storybook error message

In your Documentation settings, you can add an error message that will be shown to your viewers any time an error occurs in one of your Storybook blocks.

To do so:

  1. Go to the Storybook & npm section of your documentation settings.
  2. Type your desired error message into the empty field in the Storybook error message section.
  3. Publish your documentation to apply this change.