DocsAPI Reference

API Reference

Table Options

All the table options that can be used in the useShadcnTable hook

Many of the options you can pass to useShadcnTable are the same as the ones you can pass to the TanStack Table v9 useTable hook. The row model factories and the features object are set by the library (stFeatures), so they are not table options here.

Here is a list of all the table options that you can pass to the useShadcnTable hook.

const table = useShadcnTable({
  // all the options that you can pass here (recommended)
});

//or all of the props that could be passed to `<ShadcnTable />` IF not using `useShadcnTable` hook
return (
  <ShadcnTable
  // all of the props that could be passed here if no `table` prop is passed
  />
);

return <ShadcnTable table={table} />; //recommended
#
Prop Name
Type
Default Value
More Info Links
1Record<string, AggregationFnDef>TanStack Table Grouping Docs
2booleanTanStack Table Core Table Docs
3booleanTanStack Table Expanding Docs
4booleanTanStack Table Pagination Docs
5Array<ST_FilterOption | string> | nullST Column Filtering Docs
6'ltr' | 'rtl'muiTheme.direction || 'ltr'ST Column Resizing Docs
7'onEnd' | 'onChange''onChange'ST Column Resizing Docs
8Array<ST_ColumnDef<TData>>ST Column Options API Reference
9MutableRefObject<Virtualizer | null>
10Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>
11Array<TData>Usage Docs
12booleanfalseTanStack Table Core Table Docs
13booleanfalseTanStack Table Core Table Docs
14booleanfalseTanStack Table Core Table Docs
15booleanfalseTanStack Table Core Table Docs
16booleanfalseTanStack Table Core Table Docs
17Partial<ST_ColumnDef<TData>>TanStack Table Core Table Docs
18Partial<ST_DisplayColumnDef<TData>>ST Display Columns Docs
19{ [key: string]: ST_DisplayColumnDef<TData> }ST Display Columns Docs
20'modal' | 'cell' | 'row' | 'table' | 'custom'modal'ST Editing Docs
21booleantrueST Customize Toolbars Docs
22((cell: ST_Cell<TData>) => boolean) | boolean
23boolean | 'context-menu' | ((cell: ST_Cell<TData>) => 'context-menu' | boolean)falseST Click to Copy Docs
24booleantrueST Column Actions Docs
25booleanfalseST Column Ordering DnD Docs
26booleanfalseST Column Filtering Docs
27booleantrueST Column Filtering Docs
28booleanST Column Ordering DnD Docs
29boolean
30booleanST Column Resizing Docs
31booleanST Virtualization Docs
32booleantrueST Density Toggle Docs
33boolean | (row: ST_Row) => booleanST Editing Docs
34booleantrueST Expanding Sub Rows Docs
35booleanST Expanding Sub Rows Docs
36booleantrueTanStack Filters Docs
37booleantrueST Column Filtering Docs
38booleantrueTanStack Filters Docs
39booleantrueST Full Screen Toggle Docs
40booleantrueST Global Filtering Docs
41booleantrueST Global Filtering Docs
42booleantrueST Global Filtering Docs
43booleanST Aggregation and Grouping Docs
44booleantrueST Column Hiding Docs
45booleantrue
46booleanTanStack Sorting Docs
47booleantrueST Row Selection Docs
48boolean
49booleantrue
50boolean
51boolean
52booleanRow Numbers Feature Guide
53boolean
54boolean | (row: ST_Row) => boolean
55booleantrueST Row Selection Docs
56boolean | (row: ST_Row) => booleanST Row Selection Docs
57booleanST Virtualization Docs
58booleantrue
59booleantrue
60booleantrue
61boolean
62boolean
63booleantrue
64booleantrue
65booleantrue
66booleantrue
67booleantrue
68(dataRow: TData) => TData[]
69Record<string, FilterFn>TanStack Table Filters Docs
70booleanfalseTanStack Filtering Docs
71(column: Column<TData, unknown>) => boolean
72(row: Row<TData>) => booleanTanStack Table Expanding Docs
73(row: Row<TData>) => booleanTanStack Table Expanding Docs
74(originalRow: TData, index: number, parent?: ST_Row<TData>) => stringTanStack Table Core Table Docs
75(originalRow: TData, index: number) => undefined | TData[]TanStack Table Core Table Docs
76ST_FilterOption
77Array<ST_FilterOption | string> | null
78false | 'reorder' | 'remove'reorderTanStack Table Grouping Docs
79Partial<ST_Icons>;
80Partial<ST_TableState<TData>>Table State Management Guide
81(e: unknown) => booleanTanStack Table Sorting Docs
82(event: unknown) => booleanTanStack Table Row Selection Docs
83booleantrue
84'semantic' | 'grid' | 'grid-no-grow''semantic' //(changes based on other enabled features)TODO
85ST_LocalizationLocalization (i18n) Guide
86booleanTanStack Table Expanding Docs
87booleanTanStack Table Filters Docs
88booleanTanStack Table Grouping Docs
89booleanTanStack Table Pagination Docs
90booleanTanStack Table Sorting Docs
91number100TanStack Table Filtering Docs
92numberTanStack Table Sorting Docs
93'cells' | 'rows' | 'table-body'Memoize Components Guide
94<T>(defaultOptions: T, options: Partial<T>) => TTanStack Table Core Docs
95TableMeta TanStack Table Core Docs
96OnChangeFn<{ [key: string]: ST_FilterOption }>
97OnChangeFn<ColumnFiltersState>TanStack Table Filter Docs
98OnChangeFn<ColumnOrderState>TanStack Table Column Ordering Docs
99OnChangeFn<ColumnPinningState>TanStack Table Column Pinning Docs
100OnChangeFn<ST_ColumnResizingState>TanStack Table Column Sizing Docs
101OnChangeFn<ColumnSizingState>TanStack Table Column Sizing Docs
102OnChangeFn<ColumnVisibilityState>TanStack Table Column Visibility Docs
103({ row, table }) => voidST Editing Docs
104OnChangeFn<ST_Row<TData> | null>
105({ exitEditingMode, row, table, values}) => Promise<void> | voidST Editing Docs
106OnChangeFn<ST_DensityState>ST Density Toggle Docs
107OnChangeFn<ST_Column<TData> | null>
108OnChangeFn<ST_Row<TData> | null>
109OnChangeFn<ST_Cell<TData> | null>
110({ row, table }) => voidST Editing Docs
111OnChangeFn<ST_Row<TData> | null>
112({ exitEditingMode, row, table, values}) => Promise<void> | voidST Editing Docs
113OnChangeFn<ExpandedState>TanStack Table Expanding Docs
114OnChangeFn<GlobalFilterState>TanStack Table Filters Docs
115OnChangeFn<GlobalFilterState>TanStack Table Filters Docs
116OnChangeFn<GroupingState>TanStack Table Grouping Docs
117OnChangeFn<ST_Column<TData> | null>
118OnChangeFn<ST_Row<TData> | null>
119OnChangeFn<boolean>ST Full Screen Toggle Docs
120OnChangeFn<PaginationState>TanStack Table Pagination Docs
121OnChangeFn<RowSelectionState>TanStack Table Pinning Docs
122OnChangeFn<RowSelectionState>TanStack Table Row Selection Docs
123OnChangeFn<boolean>
124OnChangeFn<boolean>
125OnChangeFn<boolean>
126OnChangeFn<boolean>
127OnChangeFn<SortingState>TanStack Table Sorting Docs
128numberTanStack Table Pagination Docs
129booleanTanStack Table Expanding Docs
130'first' | 'last'
131'top' | 'bottom' | number'top'
132'first' | 'last''first'
133'left' | 'right''right'
134'bottom' | 'top' | 'both''bottom'
135'bottom' | 'top' | 'none''top'
136'bottom' | 'top' | 'both' | 'none''top'
137ReactNode | ({ table }) => ReactNode
138({ table }) => ReactNode
139ReactNode | ({ table }) => ReactNode
140{ cell, closeMenu, column, internalMenuItems, row, staticColumnIndex, staticRowIndex, table }) => ReactNode[]
141({ closeMenu, column, internalColumnMenuItems, table }) => ReactNode[]
142({ column, internalFilterOptions, onSelectFilterMode, table }) => ReactNode[]
143({ internalEditComponents, row, table }) => ReactNode
144({ row, table }) => ReactNode
145({ internalEditComponents, row, table }) => ReactNode
146({ table }) => ReactNode
147({ internalFilterOptions, onSelectFilterMode, table }) => ReactNode[]
148({ closeMenu, row, table }) => ReactNode[]
149({ cell, row, table }) => ReactNode
150({ table, groupedAlert, selectedAlert }) => ReactNode
151({ table}) => ReactNode
152ReactNode | ({ table }) => ReactNode
153({ table }) => ReactNode
154number
155'original' | 'static''original'
156'sticky' | 'top' | 'bottom' | 'top-and-bottom' | 'select-sticky' | 'select-top' | 'select-bottom''sticky'
157MutableRefObject<Virtualizer | null>
158Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>
159'all' | 'page''page'
160booleanTanStack Table Sorting Docs
161Record<string, SortFn>TanStack Table Sorting Docs
162Partial<ST_TableState<TData>>Table State Management Guide
163BoxProps | ({ table }) => BoxPropsshadcn/ui Box Props
164CircularProgressProps | ({ table }) => CircularProgressPropsshadcn/ui CircularProgress Props
165IconButtonProps | (({table, column}) => IconButtonProps);shadcn/ui IconButton Props
166IconButtonProps | ({table, column}) => IconButtonPropsshadcn/ui IconButton Props
167ButtonProps | ({ cell, column, row, table }) => ButtonPropsshadcn/ui Button Props
168TableCellProps | ({ row, table }) => TableCellPropsshadcn/ui TableCell Props
169IconButtonProps | ({ table }) => IconButtonPropsshadcn/ui Dialog Props
170TextFieldProps | ({ cell, column, row, table }) => TextFieldPropsshadcn/ui TextField Props
171IconButtonProps | ({ table }) => IconButtonPropsshadcn/ui IconButton Props
172IconButtonProps | ({ row, table }) => IconButtonPropsshadcn/ui IconButton Props
173AutocompleteProps | ({ column, rangeFilterIndex, table }) => AutocompletePropsshadcn/ui Autocomplete Props
174CheckboxProps | ({ column, table}) => CheckboxPropsshadcn/ui Checkbox Props
175DatePickerProps | ({ column, rangeFilterIndex, table }) => DatePickerPropsshadcn/ui Date Picker Props
176DateTimePickerProps | ({ column, rangeFilterIndex, table }) => DateTimePickerPropsshadcn/ui Date Picker Props
177SliderProps | ({ column, table}) => SliderPropsshadcn/ui Slider Props
178TextFieldProps | ({ table, column, rangeFilterIndex}) => TextFieldPropsshadcn/ui TextField Props
179TimePickerProps | ({ column, rangeFilterIndex, table }) => TimePickerPropsshadcn/ui Date Picker Props
180LinearProgressProps | ({ isTopToolbar, table }) => LinearProgressPropsshadcn/ui LinearProgress Props
181Partial<PaginationProps> | ({ table }) => Partial<PaginationProps>shadcn/ui TablePagination Props
182IconButtonProps | ({ row, table }) => IconButtonPropsshadcn/ui IconButton Props
183TextFieldProps | ({ table }) => TextFieldPropsshadcn/ui TextField Props
184CheckboxProps | ({ table }) => CheckboxPropsshadcn/ui Checkbox Props
185CheckboxProps | ({ row, table }) => CheckboxPropsshadcn/ui Checkbox Props
186SkeletonProps | ({ cell, column, row, table }) => SkeletonPropsshadcn/ui Skeleton Props
187TableCellProps | ({ cell, column, row, table }) => TableCellPropsshadcn/ui TableCell Props
188TableBodyProps | ({ table }) => TableBodyPropsshadcn/ui TableBody Props
189TableRowProps | ({ isDetailPanel, row, table }) => TableRowProps{ hover: true }shadcn/ui TableRow Props
190TableContainerProps | ({ table }) => TableContainerPropsshadcn/ui TableContainer Props
191TableCellProps| ({table, column}) => TableCellPropsshadcn/ui TableCell Props
192TableFooterProps | ({ table }) => TableFooterProps);shadcn/ui TableFooter Props
193TableRowProps | ({table, footerGroup}) => TableRowPropsshadcn/ui TableRow Props
194TableCellProps | ({ table, column}) => TableCellPropsshadcn/ui TableCell Props
195TableHeadProps | ({ table }) => TableHeadPropsshadcn/ui TableHead Props
196TableRowProps | ({ table, headerGroup}) => TableRowPropsshadcn/ui TableRow Props
197PaperProps | ({ table }} => PaperPropsshadcn/ui Paper API Docs
198TableProps | ({ table }} => TablePropsshadcn/ui TableProps API Docs
199ChipProps| ({ table }} => ChipPropsshadcn/ui Chip Props
200AlertProps | ({ table }) => AlertPropsshadcn/ui Alert Props
201BoxProps | ({ table }) => BoxPropsshadcn/ui Box Props

Wanna see the source code for this table? Check it out down below!