Skip to main content

Writing a Plugin

Grid.js Plugins are Preact Functional Components. Simply create a new functional component to render a plugin:

import { h } from "gridjs";
function MyPlugin () {
return h('h1', {}, 'Hello World!');

You don't have to use the h function to render elements if your bundler is set up to understand Preact JSX renderer:

function MyPlugin () {
return <h1>Hello World!</h1>;

See this guide for more details

Live Editor