Svelte

A Svelte wrapper component for Grid.js.

Installation#

npm install gridjs gridjs-svelte

GitHub

Usage#

Try it out in the browser

<script>
import Grid from "gridjs-svelte"
const data = [
{ name: "John", email: "[email protected]" },
{ name: "Mark", email: "[email protected]" },
]
</script>
<Grid {data} />
<style global>
@import "https://cdn.jsdelivr.net/npm/gridjs/dist/theme/mermaid.min.css";
</style>

There is also an example server side.

You can pass all Grid.js configs, refer to Grid.js documentation for specific configuration options.

How to get instance?#

You can use instance and bind it with state, see how to bindings component

Last updated on by Afshin Mehrabani