Skip to content

Installation

Install Handsontable DataGrid through your preferred package manager, and control your grid through the HotTable component’s props.

Install Handsontable

To install Handsontable locally using a package manager, run one of these commands:

npm
npm install handsontable @handsontable/react-wrapper
Yarn
yarn add handsontable @handsontable/react-wrapper
pnpm
pnpm add handsontable @handsontable/react-wrapper

Install Skills for Claude Code

Skills for Claude Code give Claude AI deep knowledge of Handsontable’s APIs, so it can build, configure, and debug your grid accurately. We recommend installing them alongside Handsontable.

In Claude Code, run:

Terminal window
/plugin marketplace add handsontable/handsontable-skills
/plugin install handsontable-skills@handsontable-skills

For more details, see Skills for Claude Code.

Register Handsontable’s modules

Import and register all of Handsontable’s modules with a single function call:

import Handsontable from 'handsontable/base';
import { registerAllModules } from 'handsontable/registry';
registerAllModules();

Or, to reduce the size of your JavaScript bundle, import only the modules that you need.

Use the HotTable component

The main Handsontable component is called HotTable.

import { HotTable } from '@handsontable/react-wrapper';

To set Handsontable’s configuration options, use HotTable’s props. For example:

<HotTable
// licenseKey="your-license-key" // get a key at https://handsontable.com/pricing/
data={[
['SKU-4821', 'Stainless Steel Water Bottle', 'Harbor Goods', 'Drinkware', 'Seattle'],
['SKU-0093', 'Wireless Mouse', 'Alpine Supply Co.', 'Electronics', 'Denver'],
['SKU-1170', 'Ergonomic Office Chair', 'Cascade Distributors', 'Furniture', 'Portland'],
['SKU-2208', 'USB-C Charging Cable', 'Summit Trading', 'Electronics', 'Austin'],
['SKU-3341', 'Aluminum Water Filter', 'Northgate Wholesale', 'Drinkware', 'Minneapolis']
]}
rowHeaders={true}
colHeaders={['SKU', 'Product', 'Supplier', 'Category', 'Warehouse']}
height="auto"
autoWrapRow={true}
autoWrapCol={true}
/>

Preview the result

JavaScript
import { HotTable } from '@handsontable/react-wrapper';
import { registerAllModules } from 'handsontable/registry';
// register Handsontable's modules
registerAllModules();
const data = [
['SKU-4821', 'Stainless Steel Water Bottle', 'Harbor Goods', 'Drinkware', 'Seattle'],
['SKU-0093', 'Wireless Mouse', 'Alpine Supply Co.', 'Electronics', 'Denver'],
['SKU-1170', 'Ergonomic Office Chair', 'Cascade Distributors', 'Furniture', 'Portland'],
['SKU-2208', 'USB-C Charging Cable', 'Summit Trading', 'Electronics', 'Austin'],
['SKU-3341', 'Aluminum Water Filter', 'Northgate Wholesale', 'Drinkware', 'Minneapolis'],
];
const ExampleComponent = () => {
return (
<HotTable
// licenseKey="your-license-key" // get a key at https://handsontable.com/pricing/
data={data}
rowHeaders={true}
colHeaders={['SKU', 'Product', 'Supplier', 'Category', 'Warehouse']}
height="auto"
autoWrapRow={true}
autoWrapCol={true}
/>
);
};
export default ExampleComponent;
TypeScript
import { FC } from 'react';
import { HotTable, HotTableProps } from '@handsontable/react-wrapper';
import Handsontable from 'handsontable/base';
import { registerAllModules } from 'handsontable/registry';
// register Handsontable's modules
registerAllModules();
const data = [
['SKU-4821', 'Stainless Steel Water Bottle', 'Harbor Goods', 'Drinkware', 'Seattle'],
['SKU-0093', 'Wireless Mouse', 'Alpine Supply Co.', 'Electronics', 'Denver'],
['SKU-1170', 'Ergonomic Office Chair', 'Cascade Distributors', 'Furniture', 'Portland'],
['SKU-2208', 'USB-C Charging Cable', 'Summit Trading', 'Electronics', 'Austin'],
['SKU-3341', 'Aluminum Water Filter', 'Northgate Wholesale', 'Drinkware', 'Minneapolis'],
];
const ExampleComponent: FC = () => {
return (
<HotTable
// licenseKey="your-license-key" // get a key at https://handsontable.com/pricing/
data={data}
rowHeaders={true}
colHeaders={['SKU', 'Product', 'Supplier', 'Category', 'Warehouse']}
height="auto"
autoWrapRow={true}
autoWrapCol={true}
/>
);
};
export default ExampleComponent;

Result

Handsontable is installed and ready to use in your project. Import it and create your first grid instance.

Related guides

Configuration options

Hooks