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


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <base href="">
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../polymer/lib/elements/dom-bind.html">
<link rel="import" href="nebula-dialog.html">
    body {
      font-family: sans-serif;
      font-size: 14px;
      margin: 0;
      padding: 16px;
      background-color: white;
    demo-snippet {
      display: block;
      box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
        0 1px 5px 0 rgba(0, 0, 0, 0.12),
        0 3px 1px -2px rgba(0, 0, 0, 0.2);
      padding: 8px 16px;
      margin-bottom: 40px;
    #alert {
      background-color: black;
      color: white;
      text-align: center;
      border: 1px solid dimgrey;
      width: 200px;
    #alert [title] {
      font-size: 1.2rem;
      background-color: #333;
      padding: 8px;
    #alert [message] {
      background-color: transparent;
      margin: 8px 0;
      padding: 8px;
    #alert [buttons] {
      padding: 8px;
    #alert button {
      display: block;
      cursor: pointer;
      color: white;
      background-color: transparent;
      padding: 8px 16px;
      border: 1px solid white;
      width: 100%;

  <dom-bind id="demo">
          <nebula-dialog id="dialog">
            <div id="alert">
              <div title>Alert</div>
              <div message>Would you like to start a dialog?</div>
              <div buttons>
                <button on-click="close">OK</button>
          <button on-click="show">Show Dialog</button>

  demo.close = function(e) {
    const dialogEl = document.getElementById("dialog");
  }; = function(e) {
    const dialogEl = document.getElementById("dialog"); {
      console.log("The dialog has been closed", result);