Back to Storybook

Primary

docs/api/doc-blocks/doc-block-primary.mdx

10.3.6795 B
Original Source

The Primary block displays the primary (first defined in the stories file) story, in a Story block. It is typically rendered immediately under the title in a docs entry.

md
import { Meta, Primary } from '@storybook/addon-docs/blocks';
import * as ButtonStories from './Button.stories';

<Meta of={ButtonStories} />

<Primary />

Primary

js
import { Primary } from '@storybook/addon-docs/blocks';

Primary is configured with the following props:

of

Type: CSF file exports

Specifies which CSF file is used to find the first story, which is then rendered by this block. Pass the full set of exports from the CSF file (not the default export!).