Skip to content

Introduction

A high-performance, framework-agnostic data grid web component built with pure TypeScript. No runtime dependencies—just drop it into any project and start rendering data.

We built this grid because we needed something that works everywhere without framework lock-in or expensive licensing. Whether you’re building a vanilla JavaScript prototype, a React dashboard, or an Angular enterprise application, you get the same powerful grid with a single codebase.

FeatureDescription
🚀 Enterprise PerformanceVirtualized rendering handles 100k+ rows at 60fps
🔧 True Framework AgnosticSingle codebase works in vanilla JS, React, Vue, Angular, Svelte
📦 Lightweight & Self-Contained~45KB gzipped with zero runtime dependencies
🧩 Extensible Plugin SystemLifecycle hooks, dependency validation, type-safe config extension
⌨️ Full Keyboard SupportArrow keys, Tab, Enter, Escape, Home/End, Page Up/Down
🎨 ThemeableCSS custom properties for complete visual customization
💡 Developer-Friendly ErrorsActionable error messages with import hints and fix suggestions
🆓 Free & Open SourceMIT licensed—no enterprise tiers or feature gates
Terminal window
npm install @toolbox-web/grid
<tbw-grid style="height: 300px;"></tbw-grid>
<script type="module">
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' },
];
</script>

That’s it—no build step required for basic usage. See the Getting Started guide for framework integration (React, Vue, Angular), CDN usage, declarative HTML, and TypeScript setup.

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

Under the hood, the grid employs patterns typically found in enterprise-grade solutions:

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 intentionally minimal. Advanced features are delivered through tree-shakeable plugins — 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 benefit from dependency validation, type-safe config extension, auto-cleanup via AbortSignal, and a third-party friendly API so you can build and distribute your own.

Using an AI coding assistant like GitHub Copilot, Cursor, or ChatGPT? We provide llms.txt files following the llms.txt standard to help AI tools understand our codebase:

  • llms.txt — Concise overview with links to all documentation
  • llms-full.txt — Comprehensive implementation guide with code examples, CSS variables, and plugin patterns

Point your AI assistant to these files for better code suggestions and answers about the grid.

Ready to dive in?


AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt