Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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.


Auto Save

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.


                <button class="alert" type="button">Alert</button>

<button class="confirm" type="button">Confirm</button>

<button class="prompt" type="button">Prompt</button>


<button class="alert-vel" type="button">Alert (custom animation)</button>

<button class="prompt-login">Prompt (login)</button>


  Open the dev console to see logging.


                html {
  padding: 20px;
  font-family: sans-serif;
  font-size: 15px;

hr {
  border: none;
  border-top: solid 1px #eee;
  margin: 40px 0;

button {
  font-size: inherit;
  border: none;
  background: #09d;
  color: white;
  padding: 10px 20px;


                $(function() {
  // Standard alert
  $('.alert').on('click', function() {
    $.alertable.alert('Howdy!').always(function() {
      console.log('Alert dismissed');
  // Standard confirm
  $('.confirm').on('click', function() {
    $.alertable.confirm('You sure?').then(function() {
      console.log('Confirmation submitted');
    }, function() {
      console.log('Confirmation canceled');      
  // Standard prompt
  $('.prompt').on('click', function() {
    $.alertable.prompt('How many?').then(function(data) {
      console.log('Prompt submitted', data);
    }, function() {
      console.log('Prompt canceled');      

  // Standard alert with custom show/hide functions (uses velocity.js)
  $('.alert-vel').on('click', function() {
    $.alertable.alert('Howdy!', {
      show: function() {
        $(this.overlay).velocity('transition.fadeIn', 300);        
        $(this.modal).velocity('transition.shrinkIn', 300);
      hide: function() {
        $(this.overlay).velocity('transition.fadeOut', 300);
        $(this.modal).velocity('transition.shrinkOut', 300);
  // Prompt (login)
  $('.prompt-login').on('click', function() {
    $.alertable.prompt('Login to continue', {
      '<input type="text" class="alertable-input" name="username" placeholder="Username">' +
      '<input type="password" class="alertable-input" name="password" placeholder="Password">' +
      '<label>' +
      '<input type="checkbox" name="remember" value="true"> ' +
      'Remember me' +
    }).then(function(data) {
      console.log('Login submitted', data);
    }, function() {
      console.log('Login canceled');