Skip to content

Introduction

A framework-agnostic data grid web component written in pure TypeScript, with no runtime dependencies. Import it, give it a height, and assign an array of rows.

It exists because we wanted one grid that works in every framework, with no licence tier. The same codebase and the same API serve a vanilla prototype and an Angular enterprise app.

FeatureDescription
🚀 PerformanceVirtualized rendering handles 100k+ rows at 60fps
🔧 Framework agnosticOne codebase for vanilla JS, React, Vue, Angular, Svelte
📦 Bundle size~47 kB gzipped, zero runtime dependencies
🧩 PluginsLifecycle hooks, dependency validation, type-safe config extension
⌨️ KeyboardArrow keys, Tab, Enter, Escape, Home/End, Page Up/Down
🎨 ThemingCSS custom properties, six built-in themes
💡 ErrorsActionable messages with import hints and fix suggestions
🆓 LicenceMIT — no enterprise tier, no feature gates

The grid ships as a standard custom element. Pick the install style that matches your setup.

Terminal window
npm install @toolbox-web/grid
main.ts
import '@toolbox-web/grid';
import { queryGrid } from '@toolbox-web/grid';
const grid = queryGrid('tbw-grid');
grid.columns = [
{ field: 'id', header: 'ID', type: 'number', sortable: true },
{ field: 'name', header: 'Name', sortable: true },
{ field: 'email', header: 'Email' },
];
grid.rows = [
{ id: 1, name: 'Alice', email: 'alice@example.com' },
{ id: 2, name: 'Bob', email: 'bob@example.com' },
{ id: 3, name: 'Carol', email: 'carol@example.com' },
];
index.html
<tbw-grid style="height: 300px;"></tbw-grid>

See the Getting Started guide for framework integration (React, Vue, Angular), declarative HTML, plugins, and TypeScript setup.

A basic grid with sortable columns. Click column headers to sort.

Six patterns do most of the work:

PatternWhat It Does
Centralized Render SchedulerBatches all updates into a single requestAnimationFrame per frame—no layout thrashing
Phase-Based ExecutionPrioritizes work (config → rows → columns → render) for predictable updates
DOM RecyclingReuses row elements via a pool with epoch-based invalidation—minimal GC pressure
Template CloningPre-created templates cloned via cloneNode(true)—3-4x faster than createElement
Event DelegationSingle listener per event type on the container—scales to any dataset size
Faux ScrollbarSeparates scroll container from content—no reflow during scroll

Read the full Architecture deep-dive for implementation details.

The core grid is small. Everything beyond rendering, sorting and virtualization ships as a tree-shakeable plugin — import only what you need:

  • SelectionPlugin — Cell, row, or range selection
  • FilteringPlugin — Column header filters with custom panels
  • EditingPlugin — Inline editing with built-in and custom editors
  • GroupingRowsPlugin — Hierarchical row grouping with aggregations
  • TreePlugin — Expandable tree data with lazy loading
  • MasterDetailPlugin — Expandable detail rows
  • ExportPlugin — CSV, Excel, or JSON export
  • ClipboardPlugin — Copy/paste with Excel-compatible formatting
  • …and many more

Plugins get dependency validation, type-safe config extension, and auto-cleanup via AbortSignal. They use the same public API third parties do, so you can build and distribute your own.

Using an AI coding assistant like GitHub Copilot, Cursor, or ChatGPT? We publish machine-readable docs (llms.txt, llms-full.txt, and a Markdown companion for every page) so your assistant generates correct grid code grounded in the current API.

See AI-Assisted Development for what we publish, where it comes from, and how to wire it into your agentic workflow.