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


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.


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.

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.


                <!DOCTYPE html>
<html lang="en" class="no-js">

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Data Grid Demo</title>

  <link rel="modulepreload" href="">
  <script type="module" src=""></script>
  <script type="module" src=""></script>

  <link rel="stylesheet" href="">
  <!-- include bootstrap just to make sure it doesn't conflict with our styles -->
  <link rel="stylesheet" href="">
  <link rel="stylesheet" href="" />
  <link rel="stylesheet" href="" />

  <style type="text/css">
    .text-center {
      text-align: center;

    .expand-cell {
      white-space: normal;

    .highlight-col {
      background-color: palegoldenrod;

    tr.approved td {
      background-color: paleturquoise;

    tr.pending td {
      background-color: azure;

      Data Grid</h1>
    <p><em>Standalone data grid web component</em></p>
    <h2>Basic usage</h2>
    <p>Url should point to a json file that return a plain array or a json response with a <code>data</code> key that contains an array</p>

      <li><code>sticky</code> to enable stick headers and footers</li>
    <data-grid url="" sticky expand></data-grid>


      <li><code>scrollable</code> to enable scrollable table. Can be useful for large tables.</li>
    <data-grid url="" scrollable></data-grid>


      <li><code>responsive</code> to enable responsive table.</li>
    <data-grid url="" responsive></data-grid>

    <h2>More options</h2>
      <li><code>filter=true</code> to enable filtering</li>
      <li><code>sort=true</code> to enable sorting</li>
      <li><code>default-sort=field</code> to set a default sort order</li>
      <li><code>reorder=true</code> to drag columns</li>
    <data-grid url="" filter="true" sort="true" reorder="true" default-sort="id" debug="true" sticky></data-grid>

    <h2>Good to know</h2>

    <p>Url can return either a plain array or a structured object with a `data` key containing the response.</p>
    <p>The structured objects can also be used to configure the grid if needed using the `options` key. Check `demo2.json` for an example.</p>
    <hr />
    Made with <l-i name="heart" set="em"></l-i> in <l-i name="be" set="fl"></l-i> by <a href="">LeKoala</a>