SpreadsheetGrid
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} />;
ExportDescription
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)).
standardFeaturesA 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 / CreateSpreadsheetGridOptionsGridFeatures 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 typesThe 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 / pinnedBottomRows and so on), console.warn tells you which feature to add, like "add fillHandle: fillHandleFeature to features" (not in production builds). Methods of features without a prop (exportCsv / downloadCsv / getExportData, and openFilterManager when there is no toolPanel or filtering) tell you the same way when called. Methods of other features (openFind and 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, writing enableColumnFilter={false} on the one without filtering avoids the warning about columns' filterType. Fine-grained options that work on top of a feature (canDropRow / includeGroupingInState / pinnedBottomRowsPlacement and 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; when onColumnsChange is 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 in standardFeatures).
  • 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 without columnMenu, the only way to sort on screen is the 「並び替え」 (Sort) tab of the tool panel (toolPanel) (with neither, use APIs such as applyState).
  • 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 filtering alone 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 and openFilterManager, so use toolPanel together with columnMenu or filtering (with neither, it becomes a stand-in and its parts aren't loaded either). The column menu's 「幅の自動調整」 (Auto-fit width) appears only with columnAutosize.
  • What happens without a feature (the ones that need care): without filtering, global / column filters are off (enableGlobalFilter / enableColumnFilter are treated as false), and filters passed with applyState stay in the state but don't apply to rows (warns in development; not counted in the top / bottom bars' 「絞り込み: …」 (Filtered: …) either). Without serverSide, dataSource is ignored and it runs in clientSide. Without labelRow, rows matching the label row predicate line up as data rows. rowGroup columns are shown as is without grouping when there is no grouping. Without autoHeight, row height is fixed (rowHeight). Even with toolPanel, without filtering the filter tab doesn't appear and openFilterManager does nothing (the same as enableColumnFilter={false} in the all-in-one; warns in development).
  • In Next.js (App Router), add 'use client' to the file that calls createSpreadsheetGrid. The created component and standardFeatures are 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 SpreadsheetGrid in the same app, but /lite is 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, a standardFeatures page went from about 90KB to about 97KB). Stick to one of the entries.
KeyPartWhat it includes (related props)Approx. (gzip)
filteringfilteringFeatureGlobal / 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)
fillHandlefillHandleFeatureThe fill handle (fillHandle)+9.8KB
columnReordercolumnReorderFeatureDragging column headers to reorder (when onColumnsChange is given / columnDragMotion)+6.5KB
rowDragrowDragFeatureDragging rows to reorder (enableRowDrag / isRowDraggable / onRowMove / canDropRow / rowDragMotion. The handle's moveRow() is in the core, so it works without this)+5.3KB
serverSideserverSideFeatureReading and writing back with the server-side row model (SSRM), save status display (dataSource / serverSideRefreshToken / showSaveStatus and more)+5.2KB
columnMenucolumnMenuFeatureThe column menu (sort, pin. Auto-fit width comes with columnAutosize, the filter entry with filtering, the panel entry with toolPanel. enableColumnMenu)+4.2KB
columnGroupscolumnGroupsFeatureColumn 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
exportexportFeatureCSV / TSV / getExportData (the handle's exportCsv / downloadCsv / getExportData)+3.5KB
contextMenucontextMenuFeatureRight-click menus for cells / rows (enableContextMenu / getContextMenuItems)+3.1KB
findfindFeatureFind in cells (find / onFindChange)+3.8KB
findReplacefindReplaceFeatureFind and replace (find={{ replace: true }}, Ctrl+H, the handle's replaceNext / replaceAll. Needs find too)+4.3KB
richCopyrichCopyFeatureFormatted copy (the text/html table of copyFormat="rich". The TSV of copyHeaders is in the core)+2.9KB
groupinggroupingFeatureRow grouping and aggregation (columns[].rowGroup / aggFunc)+2.8KB
columnAutosizecolumnAutosizeFeatureAuto-fitting column widths (double-clicking the border, the column menu item, autoSizeColumns)+2.5KB
scrollHintscrollHintFeatureThe scroll position indicator (scrollHint)+2.4KB
toolPaneltoolPanelFeatureThe tool panel (filter manager / column visibility / sorting. Its parts are lazy loaded)+2.4KB (+ 7.1KB lazy)
selectionAggregatesselectionAggregatesFeatureSelection aggregates (showSelectionAggregates)+2.2KB
labelRowlabelRowFeatureLabel rows (labelRow)+1.9KB
totalRowtotalRowFeatureThe total row (totalRow)+1.8KB
motionExtrasmotionExtrasFeatureChange highlighting, the dotted line around the copied range (the cut dotted line is in the core), cross hover (highlightChanges / showCopyRange / hoverHighlight)+1.5KB
pinnedRowspinnedRowsFeaturePinned rows (pinnedTopRows / pinnedBottomRows)+1.5KB
imeDirectInputimeDirectInputFeatureTyping directly with the IME on (imeDirectInput)+1.5KB
selectSearchselectSearchFeatureThe searchable select editor (the select editor's search / allowFreeText / loadOptions. fillRow is in the core)+4.4KB
dateTimeEditorsdateTimeEditorsFeatureTime, 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)
multiSelectmultiSelectFeatureMultiple selection (the select editor's multiple. Value shapes, copy, paste and filters are in the core)+5.2KB
changeTrackingchangeTrackingFeatureChange 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
diffViewdiffViewFeatureShowing differences (trackChanges={{ baseline }}, showRemoved / changedOnly / showOriginal, the handle's goToNextChange / goToPrevChange, ▲ ▼ in the bottom bar. Needs changeTracking too)+4.5KB
rangeDecorationsrangeDecorationsFeatureRange decorations (rangeDecorations)+2.8KB
newRownewRowFeatureThe entry row (newRow, the handle's focusNewRow / commitNewRow)+1.9KB
excelShortcutsexcelShortcutsFeatureExcel 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
treeDatatreeDataFeatureTree 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
paginationpaginationFeaturePagination (pagination / onPageChange, the handle's setPage / setPageSize / getPageInfo. loading is in the core)+3.4KB
conditionalFormatconditionalFormatFeatureConditional formatting and chips (columns[].conditionalFormat)+1.4KB
autoHeightautoHeightFeatureMeasuring 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):

SetupInitial JS (gzip)
All-in-one (SpreadsheetGrid)About 236KB
/lite with no featuresAbout 119KB
/lite + standardFeaturesAbout 145KB
/lite + standardFeatures + serverSideFeatureAbout 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 sideEffects in package.json and /* @__PURE__ */).

On this page