How to add normalize css to storybook?


by domenico , in category: Javascript , 4 months ago

How to add normalize css to storybook?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by herminia_bruen , 4 months ago


To add normalize CSS to your Storybook project, you can follow these steps:

  1. Install the normalize.css package by running the following command in your terminal:
npm install normalize.css

  1. Import the normalize.css file in your Storybook configuration file (typically named .storybook/config.js or .storybook/preview.js) by adding the following line of code:
import 'normalize.css';

  1. Save the configuration file and restart your Storybook server for the changes to take effect.

After completing these steps, your Storybook project will have the normalize.css file added, which will help to reset the default styles across different browsers and provide a consistent starting point for your CSS styles.