Skip to content

Overview

  • Table Options: every option of createShadcnSvelteTable, with types and defaults.
  • Column Options: every option of a column definition.
  • State: the state Shadcn Svelte Table adds to TanStack Table’s.

These three pages are generated from the library’s TypeScript source, so they always match the version you install.

ExportWhat it is
ShadcnSvelteTableThe table component. Takes options, or a table you created
createShadcnSvelteTable(options)Creates the table instance. Call it while a component initializes
createMRTColumnHelper<TData>()Helper for typed column definitions
MRT_* componentsThe parts of the table: MRT_TableBody, MRT_TopToolbar, MRT_GlobalFilterTextField, … Use them to build custom layouts
MRT_ActionMenuItem, MRT_Menu, MRT_IconButtonBuilding blocks for your own menu items and toolbar buttons
MRT_EditCellTextField, MRT_EditActionButtonsFor custom edit dialogs
MRT_Default_IconsThe default icon set
MRT_FilterFns, MRT_SortFns, MRT_AggregationFnsThe built-in functions
MRT_Localization_ENEnglish strings. Other languages: shadcn-svelte-tanstack-table/locales/<code>
shadcn-svelte-tanstack-table/styles.cssThe stylesheet to import once

Every type is exported with an MRT_ prefix: MRT_ColumnDef, MRT_TableOptions, MRT_TableInstance, MRT_Row, MRT_Cell, MRT_Column, MRT_Header, MRT_Localization, MRT_Icons, MRT_Theme and the state types such as MRT_SortingState and MRT_PaginationState.

The table instance is a TanStack Table v9 table, so all of its row, column, header and cell APIs are available on table, row, column, header and cell.