This page covers a next version of Handsontable, and is not published yet.

This page covers a non-latest version of Handsontable.

# Basic example in Vue 3

# Overview

The following example is a simple implementation of the @handsontable/vue3 component.

Find out which Vue 3 versions are supported →

# Example

In this example, a div element of id="example1" where the @handsontable/vue3 component will be rendered.

import { createApp } from 'vue';
import { HotTable } from '@handsontable/vue3';
import { registerAllModules } from 'handsontable/registry';
import { createSpreadsheetData } from './helpers';

// register Handsontable's modules
registerAllModules();

const app = createApp({
  data() {
    return {
      hotSettings: {
        data: createSpreadsheetData(6, 10),
        colHeaders: true,
        height: 'auto',
        licenseKey: 'non-commercial-and-evaluation'
      }
    };
  },
  components: {
    HotTable,
  }
});

app.mount('#example1');