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 class="con">
  <button class="accordion">Country Research</button>
<div class="panel">
  <p>Consumer research forms the foundation of many marketing departments. Spire offers both quantitative and qualitative research techniques across all emerging market countries, which we cover.</p>

<button class="accordion odd">Customer Decision Dynamic Analysis</button>
<div class="panel">
  <p>Customer purchase decisions are complex. Spire assists companies in deciphering business-to-business and business-to-consumer purchase decision dynamics.</p>

<button class="accordion">Market Environment Research</button>
<div class="panel">
  <p>Whether your company is seeking to grow market share, launch an innovation or enter a new market, Spire offers comprehensive solutions to bring your organisation to greater heights.</p>
              @import url(',500,700');
  margin:0px auto;
button.accordion {
    background-color: #ddd;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: 0.4s;
    padding: 1.2em;
    border-bottom: 1px solid #d2d2d2;
    font-size: 18px;
    padding: 0.9em 1.2em;
  &.active, &:hover {
button.accordion:after {
    content: '\02795'; /* Unicode character for "plus" sign (+) */
    font-size: 13px;
    color: #777;
    float: right;
    margin-left: 5px;
} {
    content: "\2796"; /* Unicode character for "minus" sign (-) */

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */

/* Style the accordion panel. Note: hidden by default */
div.panel {
    padding: 1em 18px;
    background-color: white;
    display: none;
              var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
    acc[i].onclick = function(){
        /* Toggle between adding and removing the "active" class,
        to highlight the button that controls the panel */

        /* Toggle between hiding and showing the active panel */
        var panel = this.nextElementSibling;
        if ( === "block") {
   = "none";
        } else {
   = "block";
🕑 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.