JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://fgnass.github.com/spin.js/dist/spin.js"></script>
<script src="http://fgnass.github.io/spin.js/spin.js"></script>
<body>
    <div id="window">
    </div>
</body>

CSS

#window {
    min-height: 50px;
margin: 1em;
border: 1px solid grey;    
}

JavaScript

var opts = {
  lines: 13, // The number of lines to draw
  length: 10, // The length of each line
  width: 4, // The line thickness
  radius: 11, // The radius of the inner circle
  rotate: 0, // The rotation offset
  color: '#000', // #rgb or #rrggbb
  speed: 0.6, // Rounds per second
  trail: 32, // Afterglow percentage
  shadow: false, // Whether to render a shadow
  hwaccel: false, // Whether to use hardware acceleration
  className: 'spinner', // The CSS class to assign to the spinner
  zIndex: 2e9, // The z-index (defaults to 2000000000)
  top: 'auto', // Top position relative to parent in px
  left: 'auto' // Left position relative to parent in px
};
var target, spinner;

$(function(){
    target = $('#window').get(0);
    spinner = new Spinner(opts);
    spinner.spin(target);
setTimeout(function(){
    spinner.stop();
    $(target).html("Loading finished.");
}, 3500);
});