Svelte Component Library

SvGrid UI is the component library inside @svgrid/grid: buttons, text and number inputs, dropdowns, a combo box, date and time pickers, tabs, a tree, modals, drawers, toasts, a schema-driven form and the layout pieces around them. They exist because the grid needed them. Each one is also the editor SvGrid mounts when you edit a cell, so a field in a form and the same field in a table behave the same way, keyboard included.

There is no second package to install and no UI peer dependency. The components style themselves from the --sg-* theme tokens, so the grid's theme restyles the whole page, and each control follows its WAI-ARIA pattern. When you need your own markup, the headless create* cores give you the state, keyboard handling and ARIA without the styles.

Turn it on: import { SvTextInput, SvButton } from '@svgrid/grid'

Install

npm i @svgrid/grid

Free and MIT-licensed in @svgrid/grid: no license key, no row cap, no watermark.

The code

<script lang="ts">
  import { SvTextInput, SvDropDownList, SvSwitchButton, SvButton, type ListOption } from '@svgrid/grid'

  const plans: ListOption[] = [
    { value: 'free', label: 'Free' },
    { value: 'team', label: 'Team' },
  ]
  let email = $state('')
  let plan = $state<string | null>('free')
  let notify = $state(true)
</script>

<SvTextInput label="Work email" type="email" bind:value={email} />
<SvDropDownList label="Plan" options={plans} value={plan} onChange={(v) => (plan = v)} />
<SvSwitchButton label="Email me updates" checked={notify} onChange={(v) => (notify = v)} />
<SvButton variant="primary">Create account</SvButton>

What you get

Live examples

Documentation

Related articles

Frequently asked questions

Is SvGrid UI a separate package?

No. The components ship in @svgrid/grid, so import { SvButton } from '@svgrid/grid' is all it takes. There is nothing else to install.

Is it free for commercial use?

Yes. The component library is MIT-licensed in @svgrid/grid, with no license key. The paid @svgrid/enterprise package covers grid features such as export and pivot tables.

Does it work with Svelte 5 and SvelteKit?

It is written for Svelte 5 only, with runes and snippets, and drops into a SvelteKit route like any other Svelte component.

Can I use my own markup?

Yes. Every styled component has a headless create* core that returns state, actions and prop getters you spread onto your own elements, with none of the kit's styles.

Does it support right-to-left layouts?

Yes. Pass dir="rtl" to any editor and it mirrors both layout and behavior: arrow keys reverse in tabs, tree and slider, and calendar navigation flips.

Build something else

Get started · Browse the gallery · Pricing