Storybook

Install the Contrast Storybook Addon to use Contrast with the components you build in Storybook.

This is relevant to the Diff and Component Connection features of Storybook.

1. Install the addon

npm i storybook-contrast

2. Add the following to your .storybook/main.js exports:

module.exports = {  
	addons: ['storybook-contrast']
};

3. Add the following to your .storybook/preview-body.html:

<script id="contrast-snippet" src="https://contrast-snippet.s3.amazonaws.com/contrast-snippet.js"> </script>

Still have a question? Email us at support@contrast.app to let us know!