123

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <base href="https://cdn.rawgit.com/download/polymer-cdn/2.6.0/lib/">


<script src="webcomponentsjs/webcomponents-loader.js"></script>

<link rel="import" href="iron-ajax/iron-ajax.html">
<link rel="import" href="iron-autogrow-textarea/iron-autogrow-textarea.html">
<link rel="import" href="iron-collapse/iron-collapse.html">
<link rel="import" href="iron-list/iron-list.html">
<link rel="import" href="iron-icon/iron-icon.html">
<link rel="import" href="iron-icons/iron-icons.html">
<link rel="import" href="iron-image/iron-image.html">
<link rel="import" href="iron-flex-layout/iron-flex-layout.html">

<link rel="import" href="paper-button/paper-button.html">
<link rel="import" href="paper-checkbox/paper-checkbox.html">
<link rel="import" href="paper-card/paper-card.html">
<link rel="import" href="paper-dialog/paper-dialog.html">
<link rel="import" href="paper-material/paper-material.html">
<link rel="import" href="paper-styles/paper-styles.html">
<link rel="import" href="paper-styles/classes/global.html">
<link rel="import" href="paper-tabs/paper-tabs.html">
<link rel="import" href="paper-toggle-button/paper-toggle-button.html">

<style is="custom-style">
  :root {
    --paper-tabs-selection-bar-color: var(--paper-light-blue-900);
    --paper-tab-ink: var(--paper-light-blue-100);
  
    --paper-tabs: {
      color: white;
      background-color: var(--paper-light-blue-500);
    };
  }
</style>

<h3>Paper Buttion</h3>
<section>
  <paper-button raised>
    <iron-icon icon="check"></iron-icon>
    OK
  </paper-button>
  
  <paper-button raised>
    <iron-icon icon="clear"></iron-icon>
    Cancel
  </paper-button>
</section>
<h3>Paper Card</h3>
<section>
<paper-card image="https://loremflickr.com/g/240/20/food">
  <div class="card-content">
    <div class="cafe-header">Cafe Basilico
      <div class="cafe-location cafe-light">
        <iron-icon icon="communication:location-on"></iron-icon>
        <span>250ft</span>
      </div>
    </div>
    <div class="cafe-rating">
      <iron-icon class="star" icon="star"></iron-icon>
      <iron-icon class="star" icon="star"></iron-icon>
      <iron-icon class="star" icon="star"></iron-icon>
      <iron-icon class="star" icon="star"></iron-icon>
      <iron-icon class="star" icon="star"></iron-icon>
    </div>
    <p>$・Italian, Cafe</p>
    <p class="cafe-light">Small plates, salads &amp; sandwiches in an intimate setting.</p>
  </div>
  <div class="card-actions">
    <div class="horizontal justified">
      <paper-icon-button icon="icons:event"></paper-icon-button>
      <paper-button>5:30PM</paper-button>
      <paper-button>7:30PM</paper-button>
      <paper-button>9:00PM</paper-button>
      <paper-button class="cafe-reserve">Reserve</paper-button>
    </div>
  </div>
</paper-card>
</section>
<h3>Paper Checkbox</h3>
<section>
  <paper-checkbox>Checkbox</paper-checkbox>
</section>
<h3>Paper Toggle Button</h3>
<section>
  <paper-toggle-button></paper-toggle-button>
</section>
<h3>Paper Tabs</h3>
<section>
<paper-tabs selected="0">
  <paper-tab>TAB 1</paper-tab>
  <paper-tab>TAB 2</paper-tab>
  <paper-tab>TAB 3</paper-tab>
</paper-tabs>
</section>
<h2>Iron Autogrow Textarea</h2>
<iron-autogrow-textarea></iron-autogrow-textarea>
<a href='https://www.webcomponents.org/element/PolymerElements/paper-dialog/demo/demo/index.html'>
  <h3>Paper Dialog</h3></a>
<section>
<paper-button raised onclick="dialog.open()">plain dialog</paper-button>
<paper-dialog id="dialog">
  <h2>Dialog Title</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
    irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</paper-dialog>
</section>
  <!-- <h2>Iron Collapse</h2> //Not yet working in Polymer 2.3.1
<button on-click="toggle">toggle collapse</button>
<iron-collapse id="collapse">
  <div>Content goes here...</div>
  <script>
    toggle = () => {
      this.$.collapse.toggle();
    }
  </script>
</iron-collapse> -->
<h2>Layout</h2>
<div class="layout horizontal">
  <paper-material class="flex">1</paper-material>
</div>

<div class="layout horizontal">
  <paper-material class="flex">1</paper-material>
  <paper-material class="flex">1</paper-material>
</div>

<div class="layout horizontal">
  <paper-material class="flex">1</paper-material>
  <paper-material class="flex">1</paper-material>
  <paper-material class="flex">1</paper-material>
</div>

<div class="layout horizontal">
  <paper-material class="flex">1</paper-material>
  <paper-material class="flex">1</paper-material>
  <paper-material class="flex">1</paper-material>
  <paper-material class="flex">1</paper-material>
</div>

<div>
  <iron-image src="https://i.imgur.com/qIuEEhU.jpg" sizing="cover"></iron-image>
</div>
            
          
!
            
              iron-image {
  width: 400px;
  height: 400px;
  background-color: black;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console