How to add normalize css to storybook?

Member

by domenico , in category: Javascript , 9 months ago

How to add normalize css to storybook?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by herminia_bruen , 9 months ago

@domenico 

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:
1
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:
1
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.