question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use with css modules

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
atomikscommented, Jan 29, 2019

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:

<link rel="stylesheet" href="https://unpkg.com/tippy.js@3/dist/tippy.css">
0reactions
davidkutascommented, Jun 25, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found