JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/zxcvbn/4.4.2/zxcvbn.js" integrity="sha512-TZlMGFY9xKj38t/5m2FzJ+RM/aD5alMHDe26p0mYUMoCF5G7ibfHUQILq0qQPV3wlsnCwL+TPRNK4vIWGLOkUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<div id="test">

</div>

JavaScript

window.onload = function(){
    var name = prompt("Put in a fake password to test?");
		var passwordStrength = zxcvbn(name);

    document.getElementById('test').innerHTML = JSON.stringify(passwordStrength);
};