API reference
/lite (picking the features you ship)
createSpreadsheetGrid and the 34 feature parts, the standardFeatures preset, sizes
One reference for both the React and Solid versions
Props, column definitions, handle methods, callbacks, and CSS classes and tokens are the same in both. The example code is written for React. Pick Solid at the top of the sidebar to see how to read it for the Solid version here.
Picking the features you ship (the /lite subpath)
With createSpreadsheetGrid from @ishibashi0112/spreadsheet-grid/lite, you can build a grid with only the features you plug in (added in 0.54.0). Code for features you don't plug in doesn't go into the bundle. To use every feature, use SpreadsheetGrid (all-in-one) as before.
import { createSpreadsheetGrid, standardFeatures, serverSideFeature } from '@ishibashi0112/spreadsheet-grid/lite';
import '@ishibashi0112/spreadsheet-grid/style.css';
// create it once at the top of the module (not inside a component)
const Grid = createSpreadsheetGrid({ features: { ...standardFeatures, serverSide: serverSideFeature } });
export const OrdersTable = () => <Grid columns={columns} dataSource={dataSource} />;| Export | Description |
|---|---|
createSpreadsheetGrid({ features }): <T extends object, L extends T = T>(props: SpreadsheetGridProps<T, L>) => JSX.Element (with displayName) | Creates a grid component with the feature set plugged in. features is { key: feature part } (table below). The combination of features is fixed when created. Call it once at the top of the module (calling it inside a component recreates it on every render and the grid's state is lost; if that happens, it tells you with console.warn in development. Even when called at the top of the module, it can appear once right after editing that file (HMR)). |
standardFeatures | A common combination (preset): filtering / columnMenu / toolPanel / columnAutosize / export. Add other features by spreading, like { ...standardFeatures, find: findFeature }. |
xxxFeature (30 of them) | Feature parts. The name is "key + Feature" (table below). The contents are internal parts, so pass them to features as they are (don't build or change them yourself). |
Types GridFeatures / GridFeature<K> / GridFeatureName / CreateSpreadsheetGridOptions | GridFeatures is the type of features ({ [K in GridFeatureName]?: GridFeature<K> }). GridFeature<K> is the type of a feature part, whose contents aren't visible from the type (K is the key the part goes in; putting it in another key is a type error). GridFeatureName is the keys of the feature set ('find' / 'filtering' and so on). CreateSpreadsheetGridOptions is the type of createSpreadsheetGrid's argument. When you export a combination of features as a variable, you may or may not annotate it with GridFeatures (since 0.65.0; the declaration: true d.ts can be written without the annotation). |
numberFormatter / numberParser / preloadGridPopups / restoreColumnsFromState and all public types | The same names and usage as the all-in-one entry. preloadGridPopups loads the parts of grids from the same entry, so for /lite grids use the one imported from /lite. |
- Props, the ref handle and types are shared with the all-in-one. Passing props of features you didn't plug in, or calling those features' methods, does nothing (doesn't crash). Only in development builds, once per prop that starts using a feature (
fillHandle/enableRowDrag/pinnedBottomRowsand so on),console.warntells you which feature to add, like "addfillHandle: fillHandleFeaturetofeatures" (not in production builds). Methods of features without a prop (exportCsv/downloadCsv/getExportData, andopenFilterManagerwhen there is notoolPanelorfiltering) tell you the same way when called. Methods of other features (openFindand so on) don't work without that feature's prop even in the all-in-one, so the prop's warning tells you. When sharing column definitions between grids with different features, writingenableColumnFilter={false}on the one withoutfilteringavoids the warning about columns'filterType. Fine-grained options that work on top of a feature (canDropRow/includeGroupingInState/pinnedBottomRowsPlacementand so on) do nothing without the feature, with no warning. - Features on by default in the all-in-one are on by default only when plugged in: column filters / the global filter (
filtering), the column menu (columnMenu), column drag reordering (columnReorder; whenonColumnsChangeis given), auto-fitting width by double-clicking a column border (columnAutosize), selection aggregates (selectionAggregates) and the dotted line around the copied range (motionExtras). These work without writing a prop, so leaving them out gives no development warning. For the same default behavior as the all-in-one, use{ ...standardFeatures, columnReorder: columnReorderFeature, selectionAggregates: selectionAggregatesFeature, motionExtras: motionExtrasFeature }(the last 3 aren't instandardFeatures). - What remains without features (the core): display (vertical and horizontal virtual scrolling, pinned columns), cell / range selection, keyboard operation, editing (editors and validation; time / datetime are text inputs, and date with
picker: 'calendar'is the browser's date input), copy / paste / delete, undo / redo, changing column widths, sorting, row selection (checkboxes), expandable rows (detailRow), cell notes (cellNote),getState/applyState, theme / density / motion, tooltips, top / bottom bars, ARIA. The way to sort from column headers is in the column menu, so withoutcolumnMenu, the only way to sort on screen is the 「並び替え」 (Sort) tab of the tool panel (toolPanel) (with neither, use APIs such asapplyState). - The on-screen entry points depend on the combination of features: the entry points for applying column filters on screen are the column menu's 「フィルター…」 (Filter…) and the applied-filter chips (tool panel), so
filteringalone can't add column filters (the global search box works). The entry points for opening the tool panel are the column menu item, the applied-filter chips andopenFilterManager, so usetoolPaneltogether withcolumnMenuorfiltering(with neither, it becomes a stand-in and its parts aren't loaded either). The column menu's 「幅の自動調整」 (Auto-fit width) appears only withcolumnAutosize. - What happens without a feature (the ones that need care): without
filtering, global / column filters are off (enableGlobalFilter/enableColumnFilterare treated as false), and filters passed withapplyStatestay in the state but don't apply to rows (warns in development; not counted in the top / bottom bars' 「絞り込み: …」 (Filtered: …) either). WithoutserverSide,dataSourceis ignored and it runs in clientSide. WithoutlabelRow, rows matching the label row predicate line up as data rows.rowGroupcolumns are shown as is without grouping when there is nogrouping. WithoutautoHeight, row height is fixed (rowHeight). Even withtoolPanel, withoutfilteringthe filter tab doesn't appear andopenFilterManagerdoes nothing (the same asenableColumnFilter={false}in the all-in-one; warns in development). - In Next.js (App Router), add
'use client'to the file that callscreateSpreadsheetGrid. The created component andstandardFeaturesare functions, so they can't be passed as props from server components (import and use them inside client components). - You can mix it with the all-in-one
SpreadsheetGridin the same app, but/liteis a separate build split into a file per feature, so they don't share common parts. Using both on the same page loads the common parts twice (measured with esbuild, about +34KB over the all-in-one alone), and even on separate pages the/lite-only page can get bigger (measured with Next.js 16's Turbopack, astandardFeaturespage went from about 90KB to about 97KB). Stick to one of the entries.
| Key | Part | What it includes (related props) | Approx. (gzip) |
|---|---|---|---|
filtering | filteringFeature | Global / column filters, the filter popover (lazy loaded), the chip bar, async options (enableGlobalFilter / enableColumnFilter / columns[].filterType / getFilterOptions / showFilterChipBar / onFiltersChange / manualFiltering and more) | +14.2KB (+ 8.2KB lazy) |
fillHandle | fillHandleFeature | The fill handle (fillHandle) | +9.8KB |
columnReorder | columnReorderFeature | Dragging column headers to reorder (when onColumnsChange is given / columnDragMotion) | +6.5KB |
rowDrag | rowDragFeature | Dragging rows to reorder (enableRowDrag / isRowDraggable / onRowMove / canDropRow / rowDragMotion. The handle's moveRow() is in the core, so it works without this) | +5.3KB |
serverSide | serverSideFeature | Reading and writing back with the server-side row model (SSRM), save status display (dataSource / serverSideRefreshToken / showSaveStatus and more) | +5.2KB |
columnMenu | columnMenuFeature | The column menu (sort, pin. Auto-fit width comes with columnAutosize, the filter entry with filtering, the panel entry with toolPanel. enableColumnMenu) | +4.2KB |
columnGroups | columnGroupsFeature | Column groups (multi-level column headers; columnGroups / onColumnGroupOpenChange. The handle's setColumnGroupOpen() is in the core. The grip on group headers also needs columnReorder, and the open / close item of the column menu needs columnMenu) | +4.7KB |
export | exportFeature | CSV / TSV / getExportData (the handle's exportCsv / downloadCsv / getExportData) | +3.5KB |
contextMenu | contextMenuFeature | Right-click menus for cells / rows (enableContextMenu / getContextMenuItems) | +3.1KB |
find | findFeature | Find in cells (find / onFindChange) | +3.8KB |
findReplace | findReplaceFeature | Find and replace (find={{ replace: true }}, Ctrl+H, the handle's replaceNext / replaceAll. Needs find too) | +4.3KB |
richCopy | richCopyFeature | Formatted copy (the text/html table of copyFormat="rich". The TSV of copyHeaders is in the core) | +2.9KB |
grouping | groupingFeature | Row grouping and aggregation (columns[].rowGroup / aggFunc) | +2.8KB |
columnAutosize | columnAutosizeFeature | Auto-fitting column widths (double-clicking the border, the column menu item, autoSizeColumns) | +2.5KB |
scrollHint | scrollHintFeature | The scroll position indicator (scrollHint) | +2.4KB |
toolPanel | toolPanelFeature | The tool panel (filter manager / column visibility / sorting. Its parts are lazy loaded) | +2.4KB (+ 7.1KB lazy) |
selectionAggregates | selectionAggregatesFeature | Selection aggregates (showSelectionAggregates) | +2.2KB |
labelRow | labelRowFeature | Label rows (labelRow) | +1.9KB |
totalRow | totalRowFeature | The total row (totalRow) | +1.8KB |
motionExtras | motionExtrasFeature | Change highlighting, the dotted line around the copied range (the cut dotted line is in the core), cross hover (highlightChanges / showCopyRange / hoverHighlight) | +1.5KB |
pinnedRows | pinnedRowsFeature | Pinned rows (pinnedTopRows / pinnedBottomRows) | +1.5KB |
imeDirectInput | imeDirectInputFeature | Typing directly with the IME on (imeDirectInput) | +1.5KB |
selectSearch | selectSearchFeature | The searchable select editor (the select editor's search / allowFreeText / loadOptions. fillRow is in the core) | +4.4KB |
dateTimeEditors | dateTimeEditorsFeature | Time, date-time and calendar date editors (editor's type: 'time' / 'datetime' / date's picker: 'calendar'. The calendar is lazy loaded. Value shapes, cell text and pasting are in the core) | +6.0KB (+ 3.3KB lazy) |
multiSelect | multiSelectFeature | Multiple selection (the select editor's multiple. Value shapes, copy, paste and filters are in the core) | +5.2KB |
changeTracking | changeTrackingFeature | Change tracking (trackChanges / onChangesChange, the handle's getChanges / markChangesSaved / revertChanges, the context menu's params.revertItems, adding and removing rows with trackChanges={{ rows: true }}) | +6.3KB |
diffView | diffViewFeature | Showing differences (trackChanges={{ baseline }}, showRemoved / changedOnly / showOriginal, the handle's goToNextChange / goToPrevChange, ▲ ▼ in the bottom bar. Needs changeTracking too) | +4.5KB |
rangeDecorations | rangeDecorationsFeature | Range decorations (rangeDecorations) | +2.8KB |
newRow | newRowFeature | The entry row (newRow, the handle's focusNewRow / commitNewRow) | +1.9KB |
excelShortcuts | excelShortcutsFeature | Excel keys (excelShortcuts's Ctrl+D / Ctrl+R / the editor's Ctrl+Enter / Ctrl+; / Shift+Space / Ctrl+Space. Cutting with Ctrl+X is in the core) | +2.1KB |
treeData | treeDataFeature | Tree data (treeData / onTreeRowOpenChange, the handle's setTreeRowOpen / expandAllTreeRows / collapseAllTreeRows. revealRow is in the core and scrolls even in tables that aren't tree data) | +6.7KB |
pagination | paginationFeature | Pagination (pagination / onPageChange, the handle's setPage / setPageSize / getPageInfo. loading is in the core) | +3.4KB |
conditionalFormat | conditionalFormatFeature | Conditional formatting and chips (columns[].conditionalFormat) | +1.4KB |
autoHeight | autoHeightFeature | Measuring row heights (autoHeight / columns[].autoHeight) | +1.2KB |
Sizes (gzip of the initially loaded JS; minified with esbuild, React external, @tanstack/virtual-core included; measured on the 2026-12-06 dist):
| Setup | Initial JS (gzip) |
|---|---|
All-in-one (SpreadsheetGrid) | About 236KB |
/lite with no features | About 119KB |
/lite + standardFeatures | About 145KB |
/lite + standardFeatures + serverSideFeature | About 150KB |
- Each feature's estimate is the increase when added alone to "no features"; combined, the total is a little smaller because of shared parts. It varies by a few KB with the bundler (measured on the 0.61.0 all-in-one, Vite 8 (Rolldown) is about 1.5KB smaller than esbuild and Vite 7 (Rollup) about the same. In Next.js 16, webpack is about 4KB bigger than Turbopack).
- That unused features drop out of the bundle has been checked with Vite 8, webpack 5, Next.js 16 (the default Turbopack) and esbuild (the bundler needs to honor
sideEffectsinpackage.jsonand/* @__PURE__ */).