Get started with hashgrid CDN

Apache-2.0 licensed

HashGrid is a library for creating flexible, adjustable grids with hash-based virtual scrolling.

Tags:
  • grid
  • layout
  • design
  • columns

Stable version

Copied!

How to start using hashgrid CDN


<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
  <script src="https://cdn.cdnhub.io/hashgrid/6/hashgrid.min.js"></script>
  <style>
    #grid-container {
      width: 100%;
      max-width: 800px;
      margin: 0 auto;
    }
  </style>
</head>
<body>
  <div id="grid-container">
    <div id="grid" class="hg-grid">
      <div class="hg-header">Header</div>
      <div class="hg-row">
        <div class="hg-cell hg-col-1">Cell 1</div>
        <div class="hg-cell hg-col-2">Cell 2</div>
        <div class="hg-cell hg-col-3">Cell 3</div>
      </div>
      <div class="hg-row">
        <div class="hg-cell hg-col-1">Cell 4</div>
        <div class="hg-cell hg-col-2">Cell 5</div>
        <div class="hg-cell hg-col-3">Cell 6</div>
      </div>
      <div class="hg-row">
        <div class="hg-cell hg-col-1">Cell 7</div>
        <div class="hg-cell hg-col-2">Cell 8</div>
        <div class="hg-cell hg-col-3">Cell 9</div>
      </div>
    </div>
  </div>
  <script>
    new Handsontable.Grid('#grid', {
      colHeaders: ['Header'],
      rows: [
        ['Cell 1'],
        ['Cell 2'],
        ['Cell 3'],
        ['Cell 4'],
        ['Cell 5'],
        ['Cell 6'],
        ['Cell 7'],
        ['Cell 8'],
        ['Cell 9']
      ],
      colWidths: [100, 200, 300],
      rowHeights: [50, 50, 50],
      gridData: Handsontable.helper.createSpreadsheetData(10, 3),
      contextMenu: ['copy', 'cut', 'paste'],
      licenseKey: 'non-commercial-and-evaluation'
    });
  </script>
</body>
</html>
Copied!
Copied!

All versions