@gs-grid/gs-grid
v0.1.3
Published
Framework-agnostic Web Component data grid with sorting, search, export, virtualization, and row selection
Readme
gs-grid

A new grid for evolving web.
Built with web components & it's framework agnostic.
Demo & Docs
Package
Current Features
- Framework-agnostic Web Component usage
- Configurable columns with nested field access
- Built-in column sorting
- Global search across configured fields
- CSV and Excel export helpers
- Virtualized row rendering
- Smart custom scrollbar behavior
- Optional row selection with runtime APIs
Install
yarn add @gs-grid/gs-gridBasic Usage
import '@gs-grid/gs-grid';
import { GridConfig, GridEvents } from '@gs-grid/gs-grid';
const gridConfig = new GridConfig();
gridConfig.rowHeight = 32;
gridConfig.enableRowSelection = true;
gridConfig.columnDefs = [
{ field: 'name', headerName: 'Name', enableSort: true, width: 180 },
{ field: 'email', headerName: 'Email', enableSort: true, width: '30%' },
{ field: 'company.name', headerName: 'Company', enableSort: true, width: 180 }
];
gridConfig.data = data;
const gridEl = document.querySelector('gs-grid');
const instanceId = gridEl?.getAttribute('instance-id');
if (gridEl && instanceId) {
GridEvents.setupGridConfig(instanceId, gridConfig);
}<gs-grid></gs-grid>Browser Compatibility
| Browser | Minimum Version |
|---------|----------------|
| | 67+ |
|
| 79+ |
|
| 63+ |
|
| 10.1+ |
|
| 54+ |
Requires native Web Components support (Custom Elements v1 + Shadow DOM v1).
Upcoming Features
- Pinning
- Grouping
- Column resizing
- Column dynamic re-order
Steps to run locally:
Install packages locally with:
yarn installRun demo & docs locally with:
yarn startIf necessary, clean locally generated dist & docs with:
yarn clean
