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.


                <!-- define element -->
<dom-module id="array-observers">
      :host div {padding: 10px;}
      :host, input { font-size: 20px; font-family: monoco;}
      label {display: block; margin-bottom:8px;}
      input { margin-bottom:20px; }
      <h1>Polymer Array Observers</h1>
        <input id="name" type="text">
        <button on-click="add">Add</button>
        <template is="dom-repeat" items="{{items}}">
          <input value="{{}}"></input>
          <button on-click="delete">Delete</button>
  <!-- initialize element -->
    HTMLImports.whenReady(function() {

<!-- add element to page -->
<array-observers title="ES6 Polymer Seed ..."></array-observers>




                class ArrayObservers {
  beforeRegister() { = 'array-observers';
    // initialize properties ... = {
      items: {
        type: Array,
        default: f => []
    // add observers ...
    this.observers = [
  // initialize some items ...
  ready() {
    this.items = [
      {name: 'Item 1'}, 
      {name: 'Item 2'}, 
      {name: 'Item 3'}
  // observe items array for changes ...
  _itemsChanged(changeRecord) {
    if (changeRecord.path === 'items.splices') {
      // items added or removed  ...
      this.details = 'Items added or removed';
    } else if (typeof changeRecord.value !== 'object') {
      // individual item property changes ...
      this.details = `${changeRecord.path} changed to ${changeRecord.value}`;
  // add a new item ...
  add(e) {
    const el = this.$.name;
    this.push('items', {
      name: el.value
    el.value = '';
  // remove an existing item ...
  delete(item) {
    this.splice('items', this.items.indexOf(item), 1);