alpine-tooltip
alpine-tooltip copied to clipboard
The tooltip does not appear
<button class="border inline text-black p-1 bg-white rounded m-1"
x-text="product.number" x-tooltip="product.name"></button>
I have added the script and the CSS but the tooltip not show , Even the raw tooltip does not show .. nothing works
<link rel="stylesheet" href="//unpkg.com/tippy.js@6/dist/tippy.css" />
<script src="//cdn.jsdelivr.net/npm/@ryangjchandler/[email protected]/dist/cdn.min.js" defer></script>
@HosMercury You'll need to provide more information. Do you get any console errors?
no errors
Is the button inside of an Alpine component? Is the button text working?
Yes the text works perfectly
I just ran into an issue where x-tooltip.raw
didn't show without an empty x-data
on the same element (didn't test a parent), but perhaps it's not finding the data?
I don't think the raw
modifier is meant to require x-data
though, right @ryangjchandler?
@timothyis x-data
is required, since that is what evaluates Alpine directives.
In which case, this section of the readme is confusing https://github.com/ryangjchandler/alpine-tooltip#raw-text
I wouldn't say so. The package is an Alpine plugin and therefore implies that you're using it inside of an Alpine component? If you want to update that, feel free to send a PR!