cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

              <script src="https://derbyjs.github.io/derby-standalone/dist/0.6.0-alpha37/derby-standalone.min.js"></script>

<!-- we create a template to use as the body -->
<script type="text/template" id="body">
  <!-- we use the list view and pass in our users -->
  <view is="custom"></view>
  <view is="common"></view>

<script type="text/template" id="custom">
  <div class="custom">
    custom alert:
    <view is="common" extend></view>

<script type="text/template" id="common">
  <div class="common" on-click="click()">
    Clicking on this div alerts!</div>

              body {
  font-family: Helvetica;
  background: #192F41;
  color: white;
  line-height: 1.5em
.common {
  border: 1px solid #F2627C ;
.custom {
  border: 1px solid #157EBF ;
div {
  margin: 5px;
  padding: 5px;
              // https://github.com/derbyjs/derby-standalone
var app = derby.createApp();
// convenience function for loading templates that are defined as <script type="text/template">
var page = app.createPage();

/* Example Code */

app.component("common", Common)
function Common() {}
Common.prototype.init = function() {
  this.model.set("initial", "common initialization")
Common.prototype.click = function() {
  alert("original alert")

// prototypical inheritance so we can extend the Common component
function Custom() {
  Common.apply(this, arguments);
Custom.prototype = Object.create(Common.prototype);

// our custom function to override the click behavior
Custom.prototype.click = function() {
  alert("custom alert");
app.component("custom", Custom)

/* End Example Code */



Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................