Description and default value not appearing in Storybook when rendering React/Mui components

Viewed 45

I'm using Storybook v6.5.9 to render out my React/MUI components. Everything works fine, but I can't get the description or default value to appear in the canvas under the Controls tab:

Description and default not appearing

The description appears fine when looking at the Docs tab:

Description and default appear

There's nothing in the default export and I haven't changed any default options out of the box.

1 Answers

According to the React Storybook docs under controls here

Under the directory of .storybook/preview.js

We need to add the following under controls key

export const parameters = {
  .....
  controls: {
    expanded: true
  }
  .....
}

This ensures that each control is viewed in expanded mode globally (both in Canvas and Docs tabs)

Related