Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <!doctype html>
        <link rel="stylesheet" href="" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
        <meta charset="utf-8">
            var passwordTypingTimer;         
            var passwordDoneTypingInterval = 400;
            // $('#myModal').modal('show')
            var passwordHelp = '<br>Try:<ul><li>Adding Special Symbols\n<li>Increasing the Length<li>Using Different case Letters<li>Numbers<li><a onclick="$(\'#breachInfo\').modal(\'show\')" href="#">About password breach data</a></ul>'

            var passwordScore = 0;
            function setupPasswordMeter(elemId) {
                $(document).ready(function() {
                $('#' + elemId).keyup(function(evt) {
                    var result  = zxcvbn(
                    var score   = result.score
                    var message = || 'The password is weak';

                    if (score < 4) {
                        message += passwordHelp
                    } else {
                        message = '<span class="text-success">Strong password 💪</span>'
                    var $bar = $('#strengthBar');
                    passwordScore = score;
                    switch (score) {
                        case 0:
                            $bar.attr('class', 'progress-bar bg-danger')
                                .css('width', '1%');
                        case 1:
                            $bar.attr('class', 'progress-bar bg-danger')
                                .css('width', '25%');
                        case 2:
                            $bar.attr('class', 'progress-bar bg-danger')
                                .css('width', '50%');
                        case 3:
                            $bar.attr('class', 'progress-bar bg-warning')
                                .css('width', '75%');
                        case 4:
                            $bar.attr('class', 'progress-bar bg-success')
                                .css('width', '100%');

                    passwordTypingTimer = setTimeout(passwordDoneTyping, passwordDoneTypingInterval)

            function passwordDoneTyping() {
                var password = $('#' + elemId)[0].value
                var passhash = sha1(password);
                $.get('' + passhash.slice(0, 5), function ( data ) {
                    var hashes = {}
                    var rows = data.split('\n')
                    for (row in rows) {
                        var hashdata = rows[row].split(':')
                        hashes[hashdata[0]] = hashdata[1]
                    hashsuffix = passhash.slice(5, 40).toUpperCase()
                    var found = hashes[hashsuffix]
                    if(found !== undefined) {
                        if(passwordScore == 4) {
                            $('#passwordmessage').html('Password is strong, but has been breached<br>')
                        var msg = $('#passwordmessage').html()
                        msg = 'Password was involved in ' + found + ' password breaches <br>' + msg
                        if(passwordScore == 4) {
                            msg += passwordHelp
                        var $bar = $('#strengthBar');
                        $bar.attr('class', 'progress-bar bg-danger')
                            .css('width', '0%');             
    <div class="modal" tabindex="-1" role="dialog" id="breachInfo">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title">About Passwords and Breaches</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                    <div class="modal-body">
                        <p>How do we know if your password has been breached?  We use a service,, which maintains data on breaches. <strong>Your password is never sent to a third party.</strong> Instead, a security code is generated from your password and that security code is used to check if the password was involved in breaches. Your password can never be recovered using this security code.</p><p> For more details please see: <a href="">Keeping your password secure</a></p>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <div class="container">

                <div class="row">
                        <div class="col-md-8 col-sm-10 col-xs-12">
                            <form method="post" action="">
                                <div class="form-group">
                                    <label for="username">Username</label>
                                    <input class="form-control"
                                        placeholder="Enter username">
                                <div style="height:10px;">&nbsp;</div>
                            <div class="form-group">
                                <label for="password">Password</label>
                                <input type="password" id="password_id" name="password" class="form-control" id="exampleInputPassword1" placeholder="Password" value="">
                                <div class="progress password-progress">
                                    <div id="strengthBar" class="progress-bar" role="progressbar" style="width: 0;"></div>
                                <div class="text-danger" id="passwordmessage">
                            <button type="submit" class="btn btn-primary">Signup</button>

        <script src=""></script>
        <script src=""></script>
        <script src="" integrity="sha384-6ePHh72Rl3hKio4HiJ841psfsRJveeS+aLoaEf3BWfS+gTF0XdAqku2ka8VddikM" crossorigin="anonymous"></script>
        <script src="" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
        <script src="" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>                
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.