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.


                <button id="toggle" class="button">Toggle data</button>

<div class="clusterize">
  <table class="table">
    <!-- Visual headers -->
  <div id="scrollArea" class="clusterize-scroll">
    <table class="table">
      <!-- Hidden helper headers to keep columns width (specified by css), td's must be empty -->
      <tbody id="contentArea" class="clusterize-content">
        <tr class="clusterize-no-data">

          <!-- Note colspan which forces single td to fill whole table width -->
          <td colspan="100">Loading data…</td>



                /* Set appropriate styles for table */
.table {
  table-layout: fixed;
  width: 550px;

/* It's important to set equal width for both thead's (visual and helper) */
.clusterize thead td:nth-child(1) { width: 75px; }
.clusterize thead td:nth-child(2) { width: 125px; }
.clusterize thead td:nth-child(3) { width: 150px; }
.clusterize thead td:nth-child(4) { width: 200px; }

/* Helper thead must be hidden but "display: none" can not be applied
 * so that simply remove unnecessary styles, if any (it resets Zurb foundation styles)
.clusterize-scroll thead td { padding: 0; }
.table { margin-bottom: 0; }
.button { margin: 5px 10px; }


                var data = [];
for (var i = 0; i <= 5000; i++) {
   data.push('<tr><td>' + i + '</td>\
    <td>width: 125px</td>\
    <td>width: 150px</td>\
    <td>width: 200px</td>\

var clusterize = new Clusterize({
   rows: data,
   scrollId: 'scrollArea',
   contentId: 'contentArea'
dataToggle = false;

document.getElementById('toggle').onclick = function() {
  clusterize.update(dataToggle ? data : [])
  dataToggle = !dataToggle;