Tippyjs: Add prop to pass a className

Created on 15 Jun 2020  Â·  2Comments  Â·  Source: atomiks/tippyjs

Problem

I want to be able to pass a class name to the inner tooltip box.
Currently I am using the onShown() method to add the class, but seems a bit too convoluted for something so standard?

Solution

Add additional properties to add class names to tooltip content box and arrow

💎 enhancement

Most helpful comment

create className plugin is a workaround, but this feature is such a common use case, I vote for class prop

All 2 comments

You can create your own className plugin prop which does this — see this example.

create className plugin is a workaround, but this feature is such a common use case, I vote for class prop

Was this page helpful?
0 / 5 - 0 ratings