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 is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <script type="riot/tag">
    <h3>Page 1</h3>
    <div if="{!}">
      <p>This is page 1, btw this is using riot 3.0.2</p>
      <p>These tags would normally be compiled into a js file, but I
        can't do that with codepen, hey ho.</p>
    <p if="{}">
      Your name is {}
    <h3>Page 2</h3>
    <p>This is page 2, click the link below to see a sub route in action</p>
    <p>The content of this route could be anything, even a modal.</p>
    <a href="/page2/sub/">Sub page</a>
    <h3>This is a subpage</h3>
    <p>This page is loaded inside page2, without reloading page2</p>

<div class="container">
  <ul class="nav nav-tabs">
    <li><a href="/">Page 1</a></li>
    <li><a href="/page2/">Page 2</a></li>
    <li><a href="/page3/bob">Bob's Page</a></li>





                var logger = function(ctx,next,page){

var routes = [