--- title: 'Story' --- Stories (component tests) are Storybook's fundamental building blocks. In Storybook Docs, stories are rendered in the `Story` block. ![Docs blocks with stories](./docblock-story.png) ## Working with Automatic Docs With each story you write, Storybook will automatically generate a new `Story` Doc Block, wrapped inside a [`Canvas`](./doc-block-canvas.md)(with a toolbar if it's the first "primary" story) alongside a [source code](./doc-block-source.md) preview underneath it. Below is a condensed table of the available configuration options. | Option | Description | | --------------- | ------------------------------------------------------------------------------------- | | `inlineStories` | Configures Storybook to render stories inline.
`docs: { inlineStories: false }` | ## Working with MDX With MDX, the `Story` block is not only a way of rendering stories, but how you define them. Internally, Storybook looks for named `Story` instances located at the top of your document, or inside a [Canvas](./doc-block-canvas.md). Below is an abridged example and table featuring all the available options. | Option | Description | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `args` | Provide the required component inputs (e.g., props).
``
Read the [documentation](../writing-stories/args.md) to learn more. | | `decorators` | Provide additional markup or mock a data provider to allow proper story rendering.
` (
)]}/>`
Read the [documentation](../writing-stories/decorators.md) to learn more. | | `id` | Storybook's internal story identifier. Used for embedding Storybook stories inside Docs.
``
Read the [documentation](../api/mdx.md#embedding-stories) to learn more. | | `inline` | Enables Storybook's inline renderer.
`` | | `loaders` | (Experimental) Asynchronous function for data fetching with stories.
` ({ data: await (await fetch('your-endpoint'))}) ]}/>`
Read the [documentation](../writing-stories/loaders.md) to learn more. | | `name` | Adds a name to the component story.
`` . | | `parameters` | Provides the necessary static named metadata related to the story.
`Story parameters={{ backgrounds: { values: [{ name:'red', value:'#f00' }] } }} />`
Read the [documentation](../writing-stories/parameters.md) to learn more. | | `play` | Generate component interactions.
` { await userEvent.click(screen.getByRole('button')) }}/>`
Read the [documentation](../writing-stories/play-function.md) to learn more. | ### Inline rendering All stories are rendered in the Preview iframe for isolated development in Storybook's Canvas. With Docs, if your framework supports inline rendering, it will be used by default for both performance and convenience. However, you can force this feature by providing the required configuration option (see tables above).