Building tables
Builds tables and data grids for displaying tabular information, from simple HTML tables to complex enterprise data grids. Use when creating tables, implementing sorting/filtering/pagination, handling large datasets (10-1M+ rows), building spreadsheet-like interfaces, or designing data-heavy components. Provides performance optimization strategies, accessibility patterns (WCAG/ARIA), responsive designs, and library recommendations (TanStack Table, AG Grid).From its SKILL.md
npx -y skills add ancoleman/ai-design-components --skill building-tablesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- runs commandsInstructs the agent to run 8 commands, including `python scripts/generate_mock_data.py --rows 10000` and 7 more.
SKILL.md
7.0 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
Building Tables & Data Grids
Purpose
This skill enables systematic creation of tables and data grids from simple HTML tables to enterprise-scale virtualized grids handling millions of rows. It provides clear decision frameworks based on data volume and required features, ensuring optimal performance, accessibility, and responsive design across all implementations.
When to Use
Activate this skill when:
- Creating tables, data grids, or spreadsheet-like interfaces
- Displaying tabular or structured data
- Implementing sorting, filtering, or pagination features
- Handling large datasets or addressing performance concerns
- Building inline editing or data entry interfaces
- Requiring row selection or bulk operations
- Implementing data export (CSV, Excel, PDF)
- Ensuring table accessibility or responsive behavior
Quick Decision Framework
Select implementation tier based on data volume:
<100 rows → Simple HTML table with progressive enhancement
100-1,000 rows → Client-side features (sort, filter, paginate)
1,000-10,000 → Server-side operations with API pagination
10,000-100,000 → Virtual scrolling with windowing
>100,000 rows → Enterprise grid with streaming and workers
For detailed selection criteria, reference references/selection-framework.md.
Core Implementation Patterns
Tier 1: Basic Tables (<100 rows)
For simple, read-only data display:
- Use semantic HTML
<table>structure - Add responsive behavior via CSS
- Implement client-side sorting if needed
- Reference
references/basic-tables.mdfor patterns
Example: examples/simple-responsive-table.tsx
Tier 2: Interactive Tables (100-10K rows)
For feature-rich interactions:
- Add filtering, pagination, and selection
- Implement inline or modal editing
- Use client-side operations up to 1K rows
- Switch to server-side beyond 1K rows
- Reference
references/interactive-tables.md
Example: examples/sortable-filtered-table.tsx
Tier 3: Advanced Grids (10K+ rows)
For massive datasets:
- Implement virtual scrolling
- Use server-side aggregation
- Add grouping and hierarchies
- Consider enterprise solutions
- Reference
references/advanced-grids.md
Example: examples/virtual-scrolling-grid.tsx
Performance Optimization
Critical performance thresholds:
- Client-side operations: <1,000 rows (instant, <50ms)
- Server-side operations: 1,000-10,000 rows (<200ms API)
- Virtual scrolling: 10,000+ rows (60fps, constant memory)
- Streaming: 100,000+ rows (progressive rendering)
To benchmark performance:
# Generate test data
python scripts/generate_mock_data.py --rows 10000
# Analyze rendering performance
node scripts/analyze_performance.js
For optimization strategies, reference references/performance-optimization.md.
Feature Implementation
Sorting
- Single or multi-column sorting
- Custom sort logic (numeric, date, natural)
- Visual indicators and keyboard support
- Reference
references/sorting-filtering.md
Filtering & Search
- Column-specific filters (text, range, select)
- Global search across all columns
- Advanced filter logic (AND/OR)
- Reference
references/sorting-filtering.md
Pagination
- Client-side for small datasets
- Server-side for large datasets
- Infinite scroll alternative
- Reference
references/pagination-strategies.md
Selection & Bulk Actions
- Single or multi-row selection
- Range selection (Shift+click)
- Bulk operations toolbar
- Reference
references/selection-patterns.md
Inline Editing
- Cell-level or row-level editing
- Validation and error handling
- Optimistic updates
- Reference
references/editing-patterns.md
Export
- CSV, Excel, PDF formats
- Preserve formatting and encoding
- Stream large exports
- Run
scripts/export_table_data.py
Accessibility Requirements
Essential WCAG compliance:
- Semantic HTML with proper structure
- ARIA grid pattern for interactive tables
- Full keyboard navigation
- Screen reader announcements
To validate accessibility:
node scripts/validate_accessibility.js
For complete requirements, reference references/accessibility-patterns.md.
Responsive Design
Four proven strategies:
- Horizontal scroll - Simple, preserves structure
- Card stack - Transform rows to cards on mobile
- Priority columns - Hide less important columns
- Truncate & expand - Compact with details on demand
See examples/responsive-patterns.tsx for implementations.
Reference references/responsive-strategies.md for details.
Library Recommendations
Primary: TanStack Table (Headless)
Best for custom designs and complete control:
- TypeScript-first with excellent DX
- Small bundle size (~15KB)
- Framework agnostic
- Virtual scrolling support
npm install @tanstack/react-table
See examples/tanstack-basic.tsx for setup.
Enterprise: AG Grid
Best for feature-complete solutions:
- Handles millions of rows
- Built-in advanced features
- Community (free) + Enterprise (paid)
- Excel-like user experience
npm install ag-grid-react
See examples/ag-grid-enterprise.tsx for setup.
For detailed comparison, reference references/library-comparison.md.
Design Token Integration
Tables use the design-tokens skill for consistent theming:
- Color tokens for backgrounds, borders, and states
- Spacing tokens for cell padding
- Typography tokens for text styling
- Shadow tokens for elevation
Supports light, dark, high-contrast, and custom themes. Reference the design-tokens skill for theme switching.
Working Examples
Start with the example matching the requirements:
simple-responsive-table.tsx # Basic HTML table
sortable-filtered-table.tsx # With sorting and filtering
paginated-server-table.tsx # Server-side pagination
virtual-scrolling-grid.tsx # High-performance for 100K+ rows
editable-data-grid.tsx # Inline editing with validation
grouped-aggregated-table.tsx # Hierarchical with aggregations
Testing Tools
Generate test data:
python scripts/generate_mock_data.py --rows 100000 --columns 20
Benchmark performance:
node scripts/analyze_performance.js --rows 10000
Validate accessibility:
node scripts/validate_accessibility.js
Next Steps
- Determine the data volume and feature requirements
- Select the appropriate implementation tier
- Choose between TanStack Table (flexibility) or AG Grid (features)
- Start with the matching example file
- Implement core features progressively
- Test performance and accessibility
- Apply responsive strategy for mobile
What ships with it: 31 files
265.5 KB alongside SKILL.md, 4 of them executable
assets/
- sample-data.csv2.6 KB
- table-config-schema.json14.3 KB
examples/
- ag-grid-enterprise.tsx4.6 KB
- basic-sortable-table.tsx9.5 KB
- editable-cells.tsx5.1 KB
- paginated-table.tsx13.4 KB
- responsive-patterns.tsx7.0 KB
- server-side-sorting.tsx5.9 KB
- simple-responsive-table.tsx3.7 KB
- sortable-filtered-table.tsx6.0 KB
- table-state-persistence.tsx6.7 KB
- tanstack-basic.tsx5.0 KB
- virtual-scrolling-grid.tsx3.6 KB
- virtual-scrolling.tsx12.2 KB
references/
- accessibility-patterns.md14.9 KB
- advanced-grids.md5.5 KB
- basic-tables.md4.1 KB
- editing-patterns.md7.7 KB
- interactive-tables.md6.2 KB
- library-comparison.md11.6 KB
- pagination-strategies.md17.6 KB
- performance-optimization.md11.8 KB
- responsive-strategies.md6.1 KB
- selection-framework.md7.1 KB
- selection-patterns.md8.7 KB
- sorting-filtering.md16.2 KB
scripts/
- analyze_performance.jsruns12.1 KB
- export_table_data.pyruns3.1 KB
- generate_mock_data.pyruns10.7 KB
- validate_accessibility.jsruns13.4 KB
- outputs.yaml8.9 KB
Gives 0 of the 12 instructions most performance cost skills give in ~1.4k tokens
Counted across 797 of the 1,117 authors here whose files we hold, read 2026-09-06
- Check for product marketing context firstin 46 of 797, across 20 files
- Measure before optimizingin 31 of 797, across 25 files
- Profile first to identify the actual bottleneckin 23 of 797, across 22 files
- Verify your robots.txt allows AI crawlersin 21 of 797, across 12 files
- Import directly and avoid barrel filesin 19 of 797, across 15 files
- Spawn all runs in the same turnin 18 of 797, across 11 files
- Write a draft of the skillin 17 of 797, across 10 files
- Understand the user's intentin 17 of 797, across 10 files
- Use React.cache for per-request deduplicationin 16 of 797, across 11 files
- Profile before optimizingin 16 of 797, across 14 files
- Include specific numbers with sourcesin 15 of 797, across 8 files
- Add lazy loading to below-fold imagesin 15 of 797, across 10 files
Said here and by no other author read
- Use semantic HTML table structure
- Add responsive behavior via CSS
- Implement client-side sorting if needed
- Add filtering, pagination, and selection
- Implement inline or modal editing
- Use client-side operations up to small row limits
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.