Handsontable example
HTML
<script src="https://cdn.jsdelivr.net/npm/handsontable@16.2/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@16.2/styles/handsontable.min.css" />
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@16.2/styles/ht-theme-main.css" />
<script src="https://handsontable.com/docs/scripts/fixer.js"></script>
<div id="example1" class="hot"></div>
Babel + JSX
import Handsontable from 'handsontable/base';
import { registerAllModules } from 'handsontable/registry';
import 'handsontable/styles/handsontable.css';
import 'handsontable/styles/ht-theme-main.css';
// Register all Handsontable's modules.
registerAllModules();
const container = document.querySelector('#example1');
new Handsontable(container, {
themeName: 'ht-theme-main',
licenseKey: 'non-commercial-and-evaluation',
data: [
['Mercedes', 'A 160', '14-01-2026', 6999.95],
['Citroen', 'C4 Coupe', '10-12-2025', 8330],
['Audi', 'A4 Avant', '11-07-2023', 33900],
['Opel', 'Astra', '02-02-2025', 7000],
['BMW', '320i Coupe', '24-04-2022', 30500],
],
colHeaders: ['Car', 'Model', 'Registration date', 'Price'],
height: 'auto',
columns: [
{
type: 'text',
},
{},
{
type: 'date',
dateFormat: 'DD-MM-YYYY',
correctFormat: true,
defaultDate: '01-01-2026',
}
],
autoWrapRow: true,
autoWrapCol: true,
});