JSFiddle - React, Tailwind, and code Playground

HTML

<div class="example">
                <div class="test tooltip-example-2" title="<img src='http://placehold.it/50x50' align='left' />I am EXAMPLE. <strong>Strong!</strong>, <span>span!</span> and more!">FooBar</div>
            </div>

CSS

/* This is the default styling for all Tooltipsters: */
.tooltip-message {
    background: #000; /* <- for IE */
    background: rgba(0,0,0,0.9); 
    color: #fff; 
    font-family: Arial, sans-serif;
    font-size: 12px; 
    line-height: 12px; 
    position: absolute;
    padding: 10px;
    border-radius: 2px; 
    text-align: center; 
    z-index: 9999999; 
    pointer-events: none;
    width: auto;
    overflow: visible;
}

/* When you want to create a second class for your Tooltipster messages, copy (or modify) this template and add your style to it. Don't forget to refer to it in your Tooltipster settings (tooltipClass: '.my-custom-theme') */
.my-custom-theme {
    position: absolute;
    text-align: center; 
    z-index: 9999999; 
    pointer-events: none;
    width: auto;
    /* Start styling here... */
}

/* Add a slight border radius to all images inside the Tooltipsters */
.tooltip-message img {
    border-radius: 2px;
}

/* These next classes handle the styles for the little arrow attached to the tooltip. If you need to change the color of the arrow to match a custom Tooltipster theme, set it in your Tooltipster settings (arrowColor: '#yourcolor') */
.tooltip-arrow {
    display: block;
    text-align: center;
    font-size: 12px;
    line-height: 12px;
    width: 100%;
    height: 5px;
    position: absolute;
    left: 0px;
    z-index: -1;
}
.tooltip-arrow-top {
    bottom: -3px;
    margin: 0 auto;
    text-align: center;
}
.tooltip-arrow-top-right {
    bottom: -3px;
    margin-left: -10px;
    text-align: right;
}
.tooltip-arrow-top-left {
    bottom: -3px;
    margin-left: 10px;
    text-align: left;
}
.tooltip-arrow-bottom {
    top: -10px;
    margin: 0 auto;
    text-align: center;
}
.tooltip-arrow-bottom-right {
    top: -10px;
    margin-left: -10px;
    text-align: right;
}
.tooltip-arrow-bottom-left {
    top: -10px;
    margin-left: 10px;
    text-align: left;
}
.tooltip-arrow-left {
    top: 0px;
    right: -18px;
    margin: 0 auto;
  ...

JavaScript

(function(a){a.fn.tooltipster=function(b){var c=a.extend({animation:"fade",arrow:true,arrowColor:"",delay:200,fixedWidth:0,followMouse:false,offsetX:0,offsetY:0,overrideText:"",position:"top",speed:100,timer:0,tooltipTheme:".tooltip-message"},b);return this.hover(function(){a("body").css("overflow-x","hidden");var b=a(this).attr("title");a(this).attr("title","");a(this).data("title",b);if(a.trim(c.overrideText).length>0){var b=c.overrideText}if(c.fixedWidth>0){var d=' style="width:'+c.fixedWidth+'px;"'}else{var d=""}a('<div class="'+c.tooltipTheme.replace(".","")+'"'+d+'><div class="tooltip-message-content">'+b+"</div></div>").appendTo("body").hide();if(c.followMouse==false){var e=a(this).outerWidth(false);var f=a(this).outerHeight(false);var g=a(c.tooltipTheme).not(".tooltip-kill").outerWidth(false);var h=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);var i=a(this).offset();if(c.position=="top"){var j=i.left+g-(i.left+a(this).outerWidth(false));var k=i.left+c.offsetX-j/2;var l=i.top-h-c.offsetY-10}if(c.position=="top-left"){var k=i.left+c.offsetX;var l=i.top-h-c.offsetY-10}if(c.position=="top-right"){var k=i.left+e+c.offsetX-g;var l=i.top-h-c.offsetY-10}if(c.position=="bottom"){var j=i.left+g+c.offsetX-(i.left+a(this).outerWidth(false));var k=i.left-j/2;var l=i.top+f+c.offsetY+10}if(c.position=="bottom-left"){var k=i.left+c.offsetX;var l=i.top+f+c.offsetY+10}if(c.position=="bottom-right"){var k=i.left+e+c.offsetX-g;var l=i.top+f+c.offsetY+10}if(c.position=="left"){var k=i.left-c.offsetX-g-10;var m=i.top+h+c.offsetY-(i.top+a(this).outerHeight(false));var l=i.top-m/2}if(c.position=="right"){var k=i.left+c.offsetX+e+10;var m=i.top+h+c.offsetY-(i.top+a(this).outerHeight(false));var l=i.top-m/2}}if(c.followMouse==true){var g=a(c.tooltipTheme).not(".tooltip-kill").outerWidth(false);var h=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);var...