Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 833
Roo Avatar asked Aug 31 '25 16:08

Roo


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)

like image 199
Rafatul Alam Avatar answered Sep 02 '25 08:09

Rafatul Alam