css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<div class="demo-layout">
  <div class="mdl-layout mdl-js-layout">
    <header class="mdl-layout__header">
      <div class="mdl-layout__header-row">
        <div class="mdl-layout-spacer"></div>
        <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
                    mdl-textfield--floating-label mdl-textfield--align-right">
          <label class="mdl-button mdl-js-button mdl-button--icon" for="fixed-header-drawer-exp">
            <i class="material-icons">search</i>
          </label>
          <div class="mdl-textfield__expandable-holder">
            <input class="mdl-textfield__input" type="text" name="sample" id="fixed-header-drawer-exp" />
          </div>
        </div>
      </div>
    </header>
    <div class="mdl-layout__drawer">
      <span class="mdl-layout-title">MDL components</span>
      <nav class="mdl-navigation">
        <a class="mdl-navigation__link" href="">Link</a>
        <a class="mdl-navigation__link" href="">Link</a>
        <a class="mdl-navigation__link" href="">Link</a>
        <a class="mdl-navigation__link" href="">Link</a>
      </nav>
    </div>
    <main class="mdl-layout__content">
      <div class="page-content">
        <div class="demo-grid-1 mdl-grid">
          <div class="mdl-cell mdl-cell--12-col">


            <h2>badges</h2>
            <!-- -->
            <h4>Number badge on icon</h4>
            <div class="icon material-icons mdl-badge" data-badge="1">account_box</div>
            <!-- -->
            <h4>Icon badge on icon</h4>
            <div class="icon material-icons mdl-badge" data-badge="♥">account_box</div>
            <hr>
            <div style="display:inline-block;">
              <!-- -->
              <h4>Number badge</h4>
              <div class="mdl-badge" data-badge="4">Inbox</div>
            </div>
            <div style="display:inline-block;">
              <!-- -->
              <h4>Icon badge</h4>
              <div class="mdl-badge" data-badge="♥">Mood</div>
            </div>
            <hr>
            <a href="#" class="mdl-badge" data-badge="5">This link has a badge.</a>
            <hr>
            <a href="#">This link is followed by a badge.</a>
            <span class="mdl-badge" data-badge="12"></span>
            <hr>
            <a href="#" class="mdl-badge" data-badge="123456789">This badge has too many characters.</a>
            <hr>
            <a href="#" class="mdl-badge mdl-badge--no-background" data-badge="123">This badge has no background color.</a>
            <hr>

            <h2>Buttons</h2>

            <!-- -->
            <h4>Colored FAB button</h4>
            <button class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
              <i class="material-icons">add</i>
            </button>
            <!-- -->
            <h4>Colored FAB button with ripple</h4>
            <button class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
              <i class="material-icons">add</i>
            </button>

            <hr>

            <!-- -->
            <h4>FAB button</h4>
            <button class="mdl-button mdl-js-button mdl-button--fab">
              <i class="material-icons">add</i>
            </button>
            <!-- -->
            <h4>FAB button with ripple</h4>
            <button class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect">
              <i class="material-icons">add</i>
            </button>
            <!-- -->
            <h4>Disabled FAB button</h4>
            <button class="mdl-button mdl-js-button mdl-button--fab" disabled>
              <i class="material-icons">add</i>
            </button>

            <hr>

            <!-- -->
            <h4>Raised button</h4>
            <button class="mdl-button mdl-js-button mdl-button--raised">
              Button
            </button>
            <!-- -->
            <h4>Raised button with ripple</h4>
            <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
              Button
            </button>
            <!-- -->
            <h4>Raised disabled button</h4>
            <button class="mdl-button mdl-js-button mdl-button--raised" disabled>
              Button
            </button>

            <hr>

            <!-- -->
            <h4>Colored raised button</h4>
            <button class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
              Button
            </button>
            <!-- -->
            <h4>Accent-colored raised button with ripple</h4>
            <button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent mdl-js-ripple-effect">
              Button
            </button>
            <!-- -->
            <h4>Accent-colored raised button with ripple</h4>
            <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
              Button
            </button>

            <hr>

            <!-- -->
            <h4>Flat button</h4>
            <button class="mdl-button mdl-js-button">
              Button
            </button>
            <!-- -->
            <h4>Flat button with ripple</h4>
            <button class="mdl-button mdl-js-button mdl-js-ripple-effect">
              Button
            </button>
            <!-- -->
            <h4>Disabled flat button</h4>
            <button class="mdl-button mdl-js-button" disabled>
              Button
            </button>

            <hr>

            <!-- -->
            <h4>Primary-colored flat button</h4>
            <button class="mdl-button mdl-js-button mdl-button--primary">
              Button
            </button>
            <!-- -->
            <h4>Accent-colored flat button</h4>
            <button class="mdl-button mdl-js-button mdl-button--accent">
              Button
            </button>

            <hr>

            <!-- -->
            <h4>Icon button</h4>
            <button class="mdl-button mdl-js-button mdl-button--icon">
              <i class="material-icons">mood</i>
            </button>
            <!-- -->
            <h4>Colored icon button</h4>
            <button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored">
              <i class="material-icons">mood</i>
            </button>

            <hr>

            <!-- -->
            <h4>Mini FAB button</h4>
            <button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab">
              <i class="material-icons">add</i>
            </button>
            <!-- -->
            <h4>Colored mini FAB button</h4>
            <button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored">
              <i class="material-icons">add</i>
            </button>

            <h2>Cards</h2>

            <!-- -->
            <h4>Wide card with share menu button</h4>
            <style>
              .demo-card-wide.mdl-card {
                width: 512px;
              }
              .demo-card-wide > .mdl-card__title {
                color: #fff;
                height: 176px;
                background: url('https://www.getmdl.io/assets/demos/welcome_card.jpg') center / cover;
              }
              .demo-card-wide > .mdl-card__menu {
                color: #fff;
              }
            </style>

            <div class="mdl-card mdl-shadow--2dp demo-card-wide">
              <div class="mdl-card__title">
                <h2 class="mdl-card__title-text">Welcome</h2>
              </div>
              <div class="mdl-card__supporting-text">
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sagittis pellentesque lacus eleifend lacinia...
              </div>
              <div class="mdl-card__actions mdl-card--border">
                <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
      Get Started
    </a>
              </div>
              <div class="mdl-card__menu">
                <button class="mdl-button mdl-button--icon mdl-js-button mdl-js-ripple-effect">
                  <i class="material-icons">share</i>
                </button>
              </div>
            </div>

            <hr>

            <!-- -->
            <h4>Square card</h4>
            <style>
              .demo-card-square.mdl-card {
                width: 320px;
                height: 320px;
              }
              .demo-card-square > .mdl-card__title {
                color: #fff;
                background:
                  url('https://www.getmdl.io/assets/demos/dog.png') bottom right 15% no-repeat #46B6AC;
              }
            </style>

            <div class="mdl-card mdl-shadow--2dp demo-card-square">
              <div class="mdl-card__title mdl-card--expand">
                <h2 class="mdl-card__title-text">Update</h2>
              </div>
              <div class="mdl-card__supporting-text">
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenan convallis.
              </div>
              <div class="mdl-card__actions mdl-card--border">
                <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
      View Updates
    </a>
              </div>
            </div>

            <hr>

            <!-- -->
            <h4>Image card</h4>
            <style>
              .demo-card-image.mdl-card {
                width: 256px;
                height: 256px;
                background: url('https://www.getmdl.io/assets/demos/image_card.jpg') center / cover;
              }
              .demo-card-image > .mdl-card__actions {
                height: 52px;
                padding: 16px;
                background: rgba(0, 0, 0, 0.2);
              }
              .demo-card-image__filename {
                color: #fff;
              }
            </style>

            <div class="mdl-card mdl-shadow--2dp demo-card-image">
              <div class="mdl-card__title mdl-card--expand"></div>
              <div class="mdl-card__actions">
                <span class="demo-card-image__filename">Image.jpg</span>
              </div>
            </div>
            <!-- -->
            <h4>Event card</h4>
            <style>
              .demo-card-event.mdl-card {
                width: 256px;
                height: 256px;
                background: #3E4EB8;
              }
              .demo-card-event > .mdl-card__actions {
                border-color: rgba(255, 255, 255, 0.2);
              }
              .demo-card-event > .mdl-card__title,
              .demo-card-event > .mdl-card__actions > .mdl-button {
                color: #fff;
              }
            </style>

            <div class="mdl-card mdl-shadow--2dp demo-card-event">
              <div class="mdl-card__title mdl-card--expand">
                <!-- -->
                <h4>
      Featured event:<br>
      May 24, 2016<br>
      7-11pm
    </h4>
              </div>
              <div class="mdl-card__actions mdl-card--border">
                <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
      Add to Calendar
    </a>
              </div>
            </div>

            <h2>loading</h2>

            <!-- -->
            <h4>Simple MDL Progress Bar</h4>
            <div id="p1" class="mdl-progress mdl-js-progress progress-demo"></div>
            <script>
              document.querySelector('#p1').addEventListener('mdl-componentupgraded', function() {
                this.MaterialProgress.setProgress(44);
              });
            </script>

            <hr>

            <!-- -->
            <h4>MDL Progress Bar with Indeterminate Progress</h4>
            <div id="p2" class="mdl-progress mdl-js-progress mdl-progress__indeterminate progress-demo"></div>

            <hr>

            <!-- -->
            <h4>MDL Progress Bar with Buffering</h4>
            <div id="p3" class="mdl-progress mdl-js-progress progress-demo"></div>
            <script>
              document.querySelector('#p3').addEventListener('mdl-componentupgraded', function() {
                this.MaterialProgress.setProgress(33);
                this.MaterialProgress.setBuffer(87);
              });
            </script>

            <hr>

            <!-- -->
            <h4>MDL Spinner Component</h4>
            <div class="mdl-spinner mdl-js-spinner is-active"></div>
            <!-- -->
            <h4>MDL Spinner Component with Single Color</h4>
            <div class="mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active"></div>

            <h2>Menus</h2>

            <!-- -->
            <h4>Left aligned menu below button</h4>
            <button id="demo-menu-lower-left" class="mdl-button mdl-js-button mdl-button--icon">
              <i class="material-icons">more_vert</i>
            </button>

            <ul class="mdl-menu mdl-menu--bottom-left mdl-js-menu mdl-js-ripple-effect" for="demo-menu-lower-left">
              <li class="mdl-menu__item">Some Action</li>
              <li class="mdl-menu__item">Another Action</li>
              <li disabled class="mdl-menu__item">Disabled Action</li>
              <li class="mdl-menu__item">Yet Another Action</li>
            </ul>
            <!-- -->
            <h4>Right aligned menu below button</h4>
            <button id="demo-menu-lower-right" class="mdl-button mdl-js-button mdl-button--icon">
              <i class="material-icons">more_vert</i>
            </button>

            <ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="demo-menu-lower-right">
              <li class="mdl-menu__item">Some Action</li>
              <li class="mdl-menu__item">Another Action</li>
              <li disabled class="mdl-menu__item">Disabled Action</li>
              <li class="mdl-menu__item">Yet Another Action</li>
            </ul>

            <hr>

            <!-- -->
            <h4>Left aligned menu on top of button </h4>
            <button id="demo-menu-top-left" class="mdl-button mdl-js-button mdl-button--icon">
              <i class="material-icons">more_vert</i>
            </button>

            <ul class="mdl-menu mdl-menu--top-left mdl-js-menu mdl-js-ripple-effect" for="demo-menu-top-left">
              <li class="mdl-menu__item">Some Action</li>
              <li class="mdl-menu__item">Another Action</li>
              <li disabled class="mdl-menu__item">Disabled Action</li>
              <li class="mdl-menu__item">Yet Another Action</li>
            </ul>
            <!-- -->
            <h4>Right aligned menu on top of button </h4>
            <button id="demo-menu-top-right" class="mdl-button mdl-js-button mdl-button--icon">
              <i class="material-icons">more_vert</i>
            </button>

            <ul class="mdl-menu mdl-menu--top-right mdl-js-menu mdl-js-ripple-effect" for="demo-menu-top-right">
              <li class="mdl-menu__item">Some Action</li>
              <li class="mdl-menu__item">Another Action</li>
              <li disabled class="mdl-menu__item">Disabled Action</li>
              <li class="mdl-menu__item">Yet Another Action</li>
            </ul>

            <h2>Sliders</h2>

            <!-- -->
            <h4>Default Slider</h4>
            <input class="mdl-slider mdl-js-slider" type="range" min="0" max="100" value="0" tabindex="0" />
            <!-- -->
            <h4>Slider with Starting Value</h4>
            <input class="mdl-slider mdl-js-slider" type="range" min="0" max="100" value="25" tabindex="0" />

            <h2>Toggles</h2>

            <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-1">
              <input type="checkbox" id="checkbox-1" class="mdl-checkbox__input" checked />
              <span class="mdl-checkbox__label">Checkbox</span>
            </label>
            <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-2">
              <input type="checkbox" id="checkbox-2" class="mdl-checkbox__input" />
              <span class="mdl-checkbox__label">Checkbox</span>
            </label>

            <hr>

            <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="option-1">
              <input type="radio" id="option-1" class="mdl-radio__button" name="options" value="1" checked />
              <span class="mdl-radio__label">Option 1</span>
            </label>
            <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="option-2">
              <input type="radio" id="option-2" class="mdl-radio__button" name="options" value="2" />
              <span class="mdl-radio__label">Option 2</span>
            </label>

            <hr>

            <label class="mdl-icon-toggle mdl-js-icon-toggle mdl-js-ripple-effect" for="icon-toggle-1">
              <input type="checkbox" id="icon-toggle-1" class="mdl-icon-toggle__input" checked />
              <i class="mdl-icon-toggle__label material-icons">format_bold</i>
            </label>
            <label class="mdl-icon-toggle mdl-js-icon-toggle mdl-js-ripple-effect" for="icon-toggle-2">
              <input type="checkbox" id="icon-toggle-2" class="mdl-icon-toggle__input" />
              <i class="mdl-icon-toggle__label material-icons">format_italic</i>
            </label>

            <hr>

            <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="switch-1">
              <input type="checkbox" id="switch-1" class="mdl-switch__input" checked />
              <span class="mdl-switch__label"></span>
            </label>
            <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="switch-2">
              <input type="checkbox" id="switch-2" class="mdl-switch__input" />
              <span class="mdl-switch__label"></span>
            </label>

            <h2>Tables</h2>

            <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
              <thead>
                <tr>
                  <th class="mdl-data-table__cell--non-numeric">Material</th>
                  <th>Quantity</th>
                  <th>Unit price</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td class="mdl-data-table__cell--non-numeric">Acrylic (Transparent)</td>
                  <td>25</td>
                  <td>$2.90</td>
                </tr>
                <tr>
                  <td class="mdl-data-table__cell--non-numeric">Plywood (Birch)</td>
                  <td>50</td>
                  <td>$1.25</td>
                </tr>
                <tr>
                  <td class="mdl-data-table__cell--non-numeric">Laminate (Gold on Blue)</td>
                  <td>10</td>
                  <td>$2.35</td>
                </tr>
              </tbody>
            </table>

            <h2>Text fields</h2>

            <!-- -->
            <h4>Simple Textfield</h4>
            <form action="#">
              <div class="mdl-textfield mdl-js-textfield textfield-demo">
                <input class="mdl-textfield__input" type="text" id="sample1" />
                <label class="mdl-textfield__label" for="sample1">Text...</label>
              </div>
            </form>
            <!-- -->
            <h4>Numeric Textfield</h4>
            <form action="#">
              <div class="mdl-textfield mdl-js-textfield textfield-demo">
                <input class="mdl-textfield__input" type="text" pattern="-?[0-9]*(\.[0-9]+)?" id="sample2" />
                <label class="mdl-textfield__label" for="sample2">Number...</label>
                <span class="mdl-textfield__error">Input is not a number!</span>
              </div>
            </form>

            <h2>Tooltips</h2>

            <!-- -->
            <h4>Simple Tooltip</h4>
            <div id="tt1" class="icon material-icons">add</div>
            <div class="mdl-tooltip" for="tt1">
              Follow
            </div>
            <!-- -->
            <h4>Large Tooltip</h4>
            <div id="tt2" class="icon material-icons">print</div>
            <div class="mdl-tooltip mdl-tooltip--large" for="tt2">
              Print
            </div>

            <hr>

            <!-- -->
            <h4>Rich Tooltip</h4>
            <div id="tt3" class="icon material-icons">cloud_upload</div>
            <div class="mdl-tooltip" for="tt3">
              Upload <strong>file.zip</strong>
            </div>
            <!-- -->
            <h4>Multiline Tooltip</h4>
            <div id="tt4" class="icon material-icons">share</div>
            <div class="mdl-tooltip" for="tt4">
              Share your content
              <br>via social media
            </div>


          </div>


        </div>
            
          
!
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.
Loading ..................

Console