Storybook and React

Manage Storybook settings, and dependencies for React code blocks.

Plan: All
Storybook & npm

You can manage npm dependencies, and add a custom error message for Storybook, on the Storybook & React page in your documentation settings.

Add a custom Storybook error message

Add an error message that will be shown to your viewers any time an error occurs in a Storybook block in your documentation.

To do so:

  1. Type your desired error message into the empty field in the Storybook error message section.
  2. Publish your documentation to apply this change.

Custom or predefined package.json

You can include custom or predefined package.json definition for all React code blocks in your documentation in the Package.json dependencies for React code blocks section.

To do so:

  1. Select a template to use if you want to use an existing library as a dependency, or fill in the package.json with your own custom content.
  2. If you select a template and make edits, you can click Reset to default to start with the default template again.
  3. Publish your documentation to apply the changes. The dependencies will now be used for all of your React code blocks.