Skip to content

Getting Started

Revogrid provide special wrapper based on stenciljs svelte adapter. Just import it to your project and it can be used as part of svelte system.

npm
npm i @revolist/svelte-datagrid
pnpm
pnpm add @revolist/svelte-datagrid
yarn
yarn add @revolist/svelte-datagrid
bun
bun add @revolist/svelte-datagrid

WARNING

Svelte is releasing v5.0.0. This version still has some breaking changes. We recommend using the latest stable version of svelte instead. But if you want to use the newest 5+ version of svelte, please use @revolist/[email protected].

svelte
<script lang="ts">
    import { RevoGrid, type ColumnRegular } from '@revolist/svelte-datagrid';
    const source = [
    {
      name: '1',
      details: 'Item 1',
    },
    {
      name: '2',
      details: 'Item 2',
    },
  ];
    const columns: ColumnRegular[] = [
    {
      prop: 'name',
      name: 'First',
      cellTemplate(h, { value }) {
        return h('span', { style: { background: 'red' } }, value);
      }
    },
    {
      prop: 'details',
      name: 'Second',
    },
  ];
</script>


<RevoGrid {source} {columns}></RevoGrid>

Edit RG Start (Svelte)

Revogrid is a MIT-licensed open source library made by Revolist OU.