Tooltips hovers update 2
Web2tailwind.com

Output

Code

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://unpkg.com/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
	<script src="https://unpkg.com/[email protected]/dist/tippy-bundle.umd.js"></script>
    <link href="https://unpkg.com/[email protected]^1.0/dist/tailwind.min.css" rel="stylesheet">
</head>
<body style="font-family:Roboto">
    <div class="flex justify-center items-center h-screen bg-gray-200 md:-mx-4">
        <button type="button" data-title='This is right tooltip' data-placement="right" class="bg-blue-600 text-gray-200 rounded hover:bg-blue-500 px-4 py-2 focus:outline-none">Right</button>
		<button type="button" data-title='This is bottom tooltip' data-placement="bottom" class="bg-gray-600 text-gray-100 rounded hover:bg-gray-500 px-4 py-2 focus:outline-none">Bottom</button>
		<button type="button" data-title='This is top tooltip' data-placement="top" class="bg-green-500 text-gray-100 rounded hover:bg-green-400 px-4 py-2 focus:outline-none">Top</button>
		<button type="button" data-title='This is left tooltip' data-placement="left" class="bg-red-500 text-gray-200 rounded hover:bg-red-400 px-4 py-2 focus:outline-none">Left</button>
    </div>
<script>
	tippy('button', {
      content:(reference)=>reference.getAttribute('data-title'),
       onMount(instance) {
          instance.popperInstance.setOptions({
            placement :instance.reference.getAttribute('data-placement')
          });
      },
      allowHTML: true,
    });
</script>
</body>

</html>
© 2019 - 2020 Web2tailwind.com