Right now the installation instructions tell us to run
npm install react-slick
and then
npm install slick-carousel
OR add a CDN link in your HTML
However, having tried to do just the first two, it's clear that this doesn't import the required CSS. What additional steps are required? Can we get them added to the instructions so less people have to ask this question?
If you're using webpack, you can import them like this:
/* In your css (if you are using css modules, make sure you import these separately as global css) */
@import "~slick-carousel/slick/slick.css";
@import "~slick-carousel/slick/slick-theme.css";
I agree that they should add the steps to the readme.
For me this doesn't work. I have both import statements in my scss file and it's obvious that it's still not picking the css up
@import "~/slick-carousel/slick/slick.css";
@import "~/slick-carousel/slick/slick-theme.css";
@tharrison159 I think scss has its own resolver. You have to make sure webpack handles @import resolving instead of scss if you want ~ to work. Check scss-loader's documentation.
Most helpful comment
If you're using webpack, you can import them like this:
I agree that they should add the steps to the readme.