How to use with css modules
See original GitHub issueI’m using css-modules in my project. I think this might be the reason why my tooltip does not contain any styling. I’ve imported the css in my App.js and implemented the tooltip as following:
<Tippy content="Hello">
<button>My button</button>
</Tippy>
Do I have to follow some extra steps to get the tooltip working while using css-modules or am I doing something else wrong?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Using CSS Modules in React - Programming with Mosh
First, create a normal CSS file. · Add CSS classes to this file. · Import the module you've just created from within your...
Read more >What are CSS Modules and how to use it in React - UseCSV
CSS Modules are "CSS files in which all class names and animation names are scoped locally by default". Instead of having CSS files...
Read more >A deep dive into CSS Module - LogRocket Blog
According to the official CSS Module GitHub repository, a CSS Module is a CSS file in which all class names and animation names...
Read more >Component-Scoped Styles with CSS Modules - Gatsby
Quoting from the CSS Module homepage: A CSS Module is a CSS file in which all class names and animation names are scoped...
Read more >Adding a CSS Modules Stylesheet - Create React App
CSS Modules let you use the same CSS class name in different files without worrying about naming clashes. Learn more about CSS Modules...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Kinda weird, the repo is not building for me/erroring out for some reason
It’s not ideal but you could include the CSS from a CDN:
I still think it is a serious issue as many devs use babel-css-modules https://github.com/gajus/babel-plugin-react-css-modules .
I solved it by excluding it in webpack as some commenters mentioned it above; but still, I think it’s just a workaround.