¿How to use complex html with Daisy UI Tooltip?

Viewed 348

Example:

<div class="tooltip" data-tip="hi<br>hi" data-html="true">
    ...
</div>

This output in tooltip:

hi<br>hi

How can i get this output:

hi
hi
1 Answers

By default, Daisy UI tooltip is limited. But, I think you can play with the CSS selector ".tooltip: before" to achieve what you need.

To solve your problem:

  • use i.e hi hi

  • add these classes - 'before:whitespace-pre', 'before:content-[attr(data-tip)]'

    ...
Related