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.

              <div class="container">
  <section class="section content">
    <h1 class="title">Simple Notifications</h1>
      <p>We needed a light and simple notifications system with two kinds of possible behavior. Some notifications should <strong>close themselves</strong> without any action from the user. Some <strong>require clicking</strong> on the close button. All closed notifications should be removed from the DOM. The notifications may be on the page when it loads or may be added at any other moment.</p>
      <p>We don't use any JavaScript library but this demo uses <a href="https://bulma.io/">BULMA css framework.</a>You can disable BULMA styles in the panel at the bottom of the page.</p>
    <p class="notification is-danger" role="alert">Errors happen. And it happened again.<button class="delete" type="button">Close</button></p>
    <p data-close="self" class="notification is-info" role="alert">You've just found what you were looking for!</p>
    <p class="notification is-success" role="alert">You rock! Don't forget it! <button class="delete" type="button" >Close</button></p>
    <p data-close="self" class="notification is-warning" role="alert">Weather warnings for strong winds and rain!</p>
<section class="add-new">
    <input id="bulma-state" name="bulma" type="checkbox" checked>
    Bulma CSS Enabled
  <div class="level is-mobile">
    <fieldset class="level-left level-item">
      <legend class="heading">Behavior</legend>
        <input name="self-closing" type="radio" value="yes" checked>
        Self closing
        <input name="self-closing" type="radio" value="no">
        With close button
    <fieldset class="level-item">
      <legend class="heading">Type</legend>
        <input name="notif-type" type="radio" value="info" checked>
        <input name="notif-type" type="radio" value="success">
        <input name="notif-type" type="radio" value="error">
    <div class="level-right">
      <button id="add-new" type="button" class="button heading is-primary">Add new</button>

              var notifications = new Notifications();
🕑 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.