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.

              <div id="tabstrip">
    <span>Tab 1</span>
    <span>Tab 2</span>
    <span>Tab 3</span>
        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis,
        sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus.
        Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a
        Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by
        their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic
        life One day however a small line of blind text by the name of Lorem Ipsum decided to
        The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt
        fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get
        my woven flax jodhpurs! "Now fax quiz Jack! " my brave
              body {
    font-family: "Montserrat";
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    color: #24292e;
    background-color: #321a44;

#tabstrip {
    padding: 0em;
    width: 75%;

.tab {
    font-family: "Montserrat";
    font-weight: 400;
    cursor: pointer;
    float: left;
    margin: 0 0.2em 0 0;
    min-width: 3em;
    overflow: hidden;
    padding: 0.625em;
    white-space: nowrap;
    color: #ffffff;

.activeTab {
    background-color: #221ee4;

.inactiveTab {
    background-color: #937099;

.activePanel {
    color: #ffffff;
    background-color: #221ee4;
    clear: both;
    display: block;
    padding: 1em;

.inactivePanel {
    display: none;

              "use strict";

var tabs = document.querySelectorAll("#tabstrip > span"),
    panels = document.querySelectorAll("#tabstrip > div"),
    length = tabs.length,

function getToggler(newTab, newPanel) {
    return function () {
        currentTab.className = "tab inactiveTab";
        currentPanel.className = "inactivePanel";
        newTab.className = "tab activeTab";
        newPanel.className = "activePanel";
        currentTab = newTab;
        currentPanel = newPanel;

if (length !== panels.length)
    throw new Error(
        "Number of tabs (" + length + ") and number of content panels (" + panels.length + ") are not equal"

for (var i = 0; i < length; i++) {
    var tab = tabs[i];
    var panel = panels[i];

    tab.className = "tab inactiveTab";
    tab.addEventListener("click", getToggler(tab, panel), false);
    panel.className = "inactivePanel";

currentTab = tabs[0];
currentPanel = panels[0];
currentTab.className = "tab activeTab";
currentPanel.className = "activePanel";

🕑 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 ..................