New
Automatic visual tests in Storybook, plus 2.2x faster build times for React+TSVisual test with Chromatic
Star80,490
Back to integrations
Add your integration
Categories
  • ⭐️ Popular
  • 🧩 Essentials
  • 🛠 Code
  • ⚡️ Data & state
  • ✅ Test
  • 💅 Style
  • 🎨 Design
  • ⚙️ Appearance
  • 🗄 Organize
How to install addons Create an addon
storybook-react-to-static-markup
A storybook addon which shows static markup of react components
npm install storybook-react-to-static-markup
Last updated over 2 years ago
1.7k
Downloads per week
Readme View on GitHub

Storybook addon to show static markup of react components

Installation

npm install --save-dev storybook-react-to-static-markup

Configuration

Add to .storybook/addons.js

import 'storybook-react-to-static-markup/register'

Add to .storybook/config.js

import { addDecorator } from '@storybook/react'
import { withStaticMarkup } from 'storybook-react-to-static-markup'
...
.addDecorator(withStaticMarkup)

The decorator should preceed all other decorators (such as withInfo). Otherwise the markup will contain the markup of the other decorators.

Join the community
6,324 developers and counting
WhyWhy StorybookComponent-driven UI
Open source software
Storybook

Maintained by
Chromatic
Special thanks to Netlify and CircleCI