react-handsontable

React Data Grid with Spreadsheet Look & Feel. Official React wrapper for Handsontable.

Github stars Tracking Chart

Handsontable for React

This is the official wrapper of Handsontable data grid for React.
It provides data binding, data validation, filtering, sorting and more.

npm
npm
Build status

Installation

Use npm to install this wrapper together with Handsontable.

npm install handsontable @handsontable/react

You can load it directly from jsDelivr as well.

<script src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@handsontable/react/dist/react-handsontable.min.js"></script>

<link href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css" rel="stylesheet">

The component will be available as Handsontable.react.HotTable.

Usage

Use this data grid as you would any other component in your application. Options can be set as HotTable props.

Styles

@import '~handsontable/dist/handsontable.full.css';

React Component

import React from 'react';
import ReactDOM from 'react-dom';
import { HotTable } from '@handsontable/react';

class HotApp extends React.Component {
  constructor(props) {
    super(props);
    this.data = [
      ['', 'Tesla', 'Mercedes', 'Toyota', 'Volvo'],
      ['2019', 10, 11, 12, 13],
      ['2020', 20, 11, 14, 13],
      ['2021', 30, 15, 12, 13]
    ];
  }

  render() {
    return (<HotTable data={this.data} colHeaders={true} rowHeaders={true} width="600" height="300" />);
  }
}
See the live demo

Features

A list of some of the most popular features:

  • Multiple column sorting
  • Non-contiguous selection
  • Filtering data
  • Export to file
  • Validating data
  • Conditional formatting
  • Merging cells
  • Custom cell types
  • Freezing rows/columns
  • Moving rows/columns
  • Resizing rows/columns
  • Hiding rows/columns
  • Context menu
  • Comments
  • Auto-fill option

Documentation

Support and contribution

We provide support for all users through GitHub issues. If you have a commercial license then you can add a new ticket through the contact form.

If you would like to contribute to this project, make sure you first read the guide for contributors.

Browser compatibility

Handsontable is compatible with modern browsers such as Chrome, Firefox, Safari, Opera, and Edge. It also supports Internet Explorer 9 to 11 but with limited performance.

License

This wrapper is released under the MIT license but under the hood it uses Handsontable, which is dual-licensed. You can either use it for free in all your non-commercial projects or purchase a commercial license.

License key

The license key is obligatory since Handsontable 7.0.0 (released in March 2019).

If you use Handsontable for purposes not intended toward monetary compensation such as, but not limited to, teaching, academic research, evaluation, testing and experimentation, pass a phrase 'non-commercial-and-evaluation', as presented below.

You can pass it in the settings object:

settings: {
  data: data,
  rowHeaders: true,
  colHeaders: true,
  licenseKey: 'non-commercial-and-evaluation'
}

Alternatively, you can pass it to a licenseKey prop:

<HotTable settings={settings} licenseKey="00000-00000-00000-00000-00000" />

If, on the other hand, you use Handsontable in a project that supports your commercial activity, then you must purchase the license key at handsontable.com.

The license key is validated in an offline mode. No connection is made to any server. Learn more about how it works.

Created by Handsoncode with ❤ and ☕ in Tricity.

Overview

Name With Ownerhandsontable/react-handsontable
Primary LanguageTypeScript
Program languageJavaScript (Language Count: 2)
Platform
License:MIT License
Release Count20
Last Release Name4.0.0 (Posted on 2020-08-05 13:09:01)
First Release Name0.0.1 (Posted on 2016-12-07 14:09:14)
Created At2016-11-30 14:14:11
Pushed At2021-03-16 11:32:19
Last Commit At2021-03-16 12:31:57
Stargazers Count513
Watchers Count23
Fork Count84
Commits Count118
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count30
Pull Requests Open Count0
Pull Requests Close Count24
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private
To the top