// API Reference
Table Options
All the table options that can be used in the useShadcnTable hook
Many of the options you can pass to
useShadcnTableare the same as the ones you can pass to the TanStack Table v9 useTable hook. The row model factories and thefeaturesobject 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 | |
|---|---|---|---|---|---|
| 1 | Record<string, AggregationFnDef> | TanStack Table Grouping Docs | |||
| 2 | boolean | TanStack Table Core Table Docs | |||
| 3 | boolean | TanStack Table Expanding Docs | |||
| 4 | boolean | TanStack Table Pagination Docs | |||
| 5 | Array<ST_FilterOption | string> | null | ST Column Filtering Docs | |||
| 6 | 'ltr' | 'rtl' | muiTheme.direction || 'ltr' | ST Column Resizing Docs | ||
| 7 | 'onEnd' | 'onChange' | 'onChange' | ST Column Resizing Docs | ||
| 8 | Array<ST_ColumnDef<TData>> | ST Column Options API Reference | |||
| 9 | MutableRefObject<Virtualizer | null> | ||||
| 10 | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>> | ||||
| 11 | Array<TData> | Usage Docs | |||
| 12 | boolean | false | TanStack Table Core Table Docs | ||
| 13 | boolean | false | TanStack Table Core Table Docs | ||
| 14 | boolean | false | TanStack Table Core Table Docs | ||
| 15 | boolean | false | TanStack Table Core Table Docs | ||
| 16 | boolean | false | TanStack Table Core Table Docs | ||
| 17 | Partial<ST_ColumnDef<TData>> | TanStack Table Core Table Docs | |||
| 18 | Partial<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 | ||
| 21 | boolean | true | ST Customize Toolbars Docs | ||
| 22 | ((cell: ST_Cell<TData>) => boolean) | boolean | ||||
| 23 | boolean | 'context-menu' | ((cell: ST_Cell<TData>) => 'context-menu' | boolean) | false | ST Click to Copy Docs | ||
| 24 | boolean | true | ST Column Actions Docs | ||
| 25 | boolean | false | ST Column Ordering DnD Docs | ||
| 26 | boolean | false | ST Column Filtering Docs | ||
| 27 | boolean | true | ST Column Filtering Docs | ||
| 28 | boolean | ST Column Ordering DnD Docs | |||
| 29 | boolean | ||||
| 30 | boolean | ST Column Resizing Docs | |||
| 31 | boolean | ST Virtualization Docs | |||
| 32 | boolean | true | ST Density Toggle Docs | ||
| 33 | boolean | (row: ST_Row) => boolean | ST Editing Docs | |||
| 34 | boolean | true | ST Expanding Sub Rows Docs | ||
| 35 | boolean | ST Expanding Sub Rows Docs | |||
| 36 | boolean | true | TanStack Filters Docs | ||
| 37 | boolean | true | ST Column Filtering Docs | ||
| 38 | boolean | true | TanStack Filters Docs | ||
| 39 | boolean | true | ST Full Screen Toggle Docs | ||
| 40 | boolean | true | ST Global Filtering Docs | ||
| 41 | boolean | true | ST Global Filtering Docs | ||
| 42 | boolean | true | ST Global Filtering Docs | ||
| 43 | boolean | ST Aggregation and Grouping Docs | |||
| 44 | boolean | true | ST Column Hiding Docs | ||
| 45 | boolean | true | |||
| 46 | boolean | TanStack Sorting Docs | |||
| 47 | boolean | true | ST Row Selection Docs | ||
| 48 | boolean | ||||
| 49 | boolean | true | |||
| 50 | boolean | ||||
| 51 | boolean | ||||
| 52 | boolean | Row Numbers Feature Guide | |||
| 53 | boolean | ||||
| 54 | boolean | (row: ST_Row) => boolean | ||||
| 55 | boolean | true | ST Row Selection Docs | ||
| 56 | boolean | (row: ST_Row) => boolean | ST Row Selection Docs | |||
| 57 | boolean | ST Virtualization Docs | |||
| 58 | boolean | true | |||
| 59 | boolean | true | |||
| 60 | boolean | true | |||
| 61 | boolean | ||||
| 62 | boolean | ||||
| 63 | boolean | true | |||
| 64 | boolean | true | |||
| 65 | boolean | true | |||
| 66 | boolean | true | |||
| 67 | boolean | true | |||
| 68 | (dataRow: TData) => TData[] | ||||
| 69 | Record<string, FilterFn> | TanStack Table Filters Docs | |||
| 70 | boolean | false | TanStack Filtering Docs | ||
| 71 | (column: Column<TData, unknown>) => boolean | ||||
| 72 | (row: Row<TData>) => boolean | TanStack Table Expanding Docs | |||
| 73 | (row: Row<TData>) => boolean | TanStack Table Expanding Docs | |||
| 74 | (originalRow: TData, index: number, parent?: ST_Row<TData>) => string | TanStack Table Core Table Docs | |||
| 75 | (originalRow: TData, index: number) => undefined | TData[] | TanStack Table Core Table Docs | |||
| 76 | ST_FilterOption | ||||
| 77 | Array<ST_FilterOption | string> | null | ||||
| 78 | false | 'reorder' | 'remove' | reorder | TanStack Table Grouping Docs | ||
| 79 | Partial<ST_Icons>; | ||||
| 80 | Partial<ST_TableState<TData>> | Table State Management Guide | |||
| 81 | (e: unknown) => boolean | TanStack Table Sorting Docs | |||
| 82 | (event: unknown) => boolean | TanStack Table Row Selection Docs | |||
| 83 | boolean | true | |||
| 84 | 'semantic' | 'grid' | 'grid-no-grow' | 'semantic' //(changes based on other enabled features) | TODO | ||
| 85 | ST_Localization | Localization (i18n) Guide | |||
| 86 | boolean | TanStack Table Expanding Docs | |||
| 87 | boolean | TanStack Table Filters Docs | |||
| 88 | boolean | TanStack Table Grouping Docs | |||
| 89 | boolean | TanStack Table Pagination Docs | |||
| 90 | boolean | TanStack Table Sorting Docs | |||
| 91 | number | 100 | TanStack Table Filtering Docs | ||
| 92 | number | TanStack Table Sorting Docs | |||
| 93 | 'cells' | 'rows' | 'table-body' | Memoize Components Guide | |||
| 94 | <T>(defaultOptions: T, options: Partial<T>) => T | TanStack Table Core Docs | |||
| 95 | TableMeta | TanStack Table Core Docs | |||
| 96 | OnChangeFn<{ [key: string]: ST_FilterOption }> | ||||
| 97 | OnChangeFn<ColumnFiltersState> | TanStack Table Filter Docs | |||
| 98 | OnChangeFn<ColumnOrderState> | TanStack Table Column Ordering Docs | |||
| 99 | OnChangeFn<ColumnPinningState> | TanStack Table Column Pinning Docs | |||
| 100 | OnChangeFn<ST_ColumnResizingState> | TanStack Table Column Sizing Docs | |||
| 101 | OnChangeFn<ColumnSizingState> | TanStack Table Column Sizing Docs | |||
| 102 | OnChangeFn<ColumnVisibilityState> | TanStack Table Column Visibility Docs | |||
| 103 | ({ row, table }) => void | ST Editing Docs | |||
| 104 | OnChangeFn<ST_Row<TData> | null> | ||||
| 105 | ({ exitEditingMode, row, table, values}) => Promise<void> | void | ST Editing Docs | |||
| 106 | OnChangeFn<ST_DensityState> | ST Density Toggle Docs | |||
| 107 | OnChangeFn<ST_Column<TData> | null> | ||||
| 108 | OnChangeFn<ST_Row<TData> | null> | ||||
| 109 | OnChangeFn<ST_Cell<TData> | null> | ||||
| 110 | ({ row, table }) => void | ST Editing Docs | |||
| 111 | OnChangeFn<ST_Row<TData> | null> | ||||
| 112 | ({ exitEditingMode, row, table, values}) => Promise<void> | void | ST Editing Docs | |||
| 113 | OnChangeFn<ExpandedState> | TanStack Table Expanding Docs | |||
| 114 | OnChangeFn<GlobalFilterState> | TanStack Table Filters Docs | |||
| 115 | OnChangeFn<GlobalFilterState> | TanStack Table Filters Docs | |||
| 116 | OnChangeFn<GroupingState> | TanStack Table Grouping Docs | |||
| 117 | OnChangeFn<ST_Column<TData> | null> | ||||
| 118 | OnChangeFn<ST_Row<TData> | null> | ||||
| 119 | OnChangeFn<boolean> | ST Full Screen Toggle Docs | |||
| 120 | OnChangeFn<PaginationState> | TanStack Table Pagination Docs | |||
| 121 | OnChangeFn<RowSelectionState> | TanStack Table Pinning Docs | |||
| 122 | OnChangeFn<RowSelectionState> | TanStack Table Row Selection Docs | |||
| 123 | OnChangeFn<boolean> | ||||
| 124 | OnChangeFn<boolean> | ||||
| 125 | OnChangeFn<boolean> | ||||
| 126 | OnChangeFn<boolean> | ||||
| 127 | OnChangeFn<SortingState> | TanStack Table Sorting Docs | |||
| 128 | number | TanStack Table Pagination Docs | |||
| 129 | boolean | TanStack 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' | |||
| 137 | ReactNode | ({ table }) => ReactNode | ||||
| 138 | ({ table }) => ReactNode | ||||
| 139 | ReactNode | ({ 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 | ||||
| 152 | ReactNode | ({ table }) => ReactNode | ||||
| 153 | ({ table }) => ReactNode | ||||
| 154 | number | ||||
| 155 | 'original' | 'static' | 'original' | |||
| 156 | 'sticky' | 'top' | 'bottom' | 'top-and-bottom' | 'select-sticky' | 'select-top' | 'select-bottom' | 'sticky' | |||
| 157 | MutableRefObject<Virtualizer | null> | ||||
| 158 | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>> | ||||
| 159 | 'all' | 'page' | 'page' | |||
| 160 | boolean | TanStack Table Sorting Docs | |||
| 161 | Record<string, SortFn> | TanStack Table Sorting Docs | |||
| 162 | Partial<ST_TableState<TData>> | Table State Management Guide | |||
| 163 | BoxProps | ({ table }) => BoxProps | shadcn/ui Box Props | |||
| 164 | CircularProgressProps | ({ table }) => CircularProgressProps | shadcn/ui CircularProgress Props | |||
| 165 | IconButtonProps | (({table, column}) => IconButtonProps); | shadcn/ui IconButton Props | |||
| 166 | IconButtonProps | ({table, column}) => IconButtonProps | shadcn/ui IconButton Props | |||
| 167 | ButtonProps | ({ cell, column, row, table }) => ButtonProps | shadcn/ui Button Props | |||
| 168 | TableCellProps | ({ row, table }) => TableCellProps | shadcn/ui TableCell Props | |||
| 169 | IconButtonProps | ({ table }) => IconButtonProps | shadcn/ui Dialog Props | |||
| 170 | TextFieldProps | ({ cell, column, row, table }) => TextFieldProps | shadcn/ui TextField Props | |||
| 171 | IconButtonProps | ({ table }) => IconButtonProps | shadcn/ui IconButton Props | |||
| 172 | IconButtonProps | ({ row, table }) => IconButtonProps | shadcn/ui IconButton Props | |||
| 173 | AutocompleteProps | ({ column, rangeFilterIndex, table }) => AutocompleteProps | shadcn/ui Autocomplete Props | |||
| 174 | CheckboxProps | ({ column, table}) => CheckboxProps | shadcn/ui Checkbox Props | |||
| 175 | DatePickerProps | ({ column, rangeFilterIndex, table }) => DatePickerProps | shadcn/ui Date Picker Props | |||
| 176 | DateTimePickerProps | ({ column, rangeFilterIndex, table }) => DateTimePickerProps | shadcn/ui Date Picker Props | |||
| 177 | SliderProps | ({ column, table}) => SliderProps | shadcn/ui Slider Props | |||
| 178 | TextFieldProps | ({ table, column, rangeFilterIndex}) => TextFieldProps | shadcn/ui TextField Props | |||
| 179 | TimePickerProps | ({ column, rangeFilterIndex, table }) => TimePickerProps | shadcn/ui Date Picker Props | |||
| 180 | LinearProgressProps | ({ isTopToolbar, table }) => LinearProgressProps | shadcn/ui LinearProgress Props | |||
| 181 | Partial<PaginationProps> | ({ table }) => Partial<PaginationProps> | shadcn/ui TablePagination Props | |||
| 182 | IconButtonProps | ({ row, table }) => IconButtonProps | shadcn/ui IconButton Props | |||
| 183 | TextFieldProps | ({ table }) => TextFieldProps | shadcn/ui TextField Props | |||
| 184 | CheckboxProps | ({ table }) => CheckboxProps | shadcn/ui Checkbox Props | |||
| 185 | CheckboxProps | ({ row, table }) => CheckboxProps | shadcn/ui Checkbox Props | |||
| 186 | SkeletonProps | ({ cell, column, row, table }) => SkeletonProps | shadcn/ui Skeleton Props | |||
| 187 | TableCellProps | ({ cell, column, row, table }) => TableCellProps | shadcn/ui TableCell Props | |||
| 188 | TableBodyProps | ({ table }) => TableBodyProps | shadcn/ui TableBody Props | |||
| 189 | TableRowProps | ({ isDetailPanel, row, table }) => TableRowProps | { hover: true } | shadcn/ui TableRow Props | ||
| 190 | TableContainerProps | ({ table }) => TableContainerProps | shadcn/ui TableContainer Props | |||
| 191 | TableCellProps| ({table, column}) => TableCellProps | shadcn/ui TableCell Props | |||
| 192 | TableFooterProps | ({ table }) => TableFooterProps); | shadcn/ui TableFooter Props | |||
| 193 | TableRowProps | ({table, footerGroup}) => TableRowProps | shadcn/ui TableRow Props | |||
| 194 | TableCellProps | ({ table, column}) => TableCellProps | shadcn/ui TableCell Props | |||
| 195 | TableHeadProps | ({ table }) => TableHeadProps | shadcn/ui TableHead Props | |||
| 196 | TableRowProps | ({ table, headerGroup}) => TableRowProps | shadcn/ui TableRow Props | |||
| 197 | PaperProps | ({ table }} => PaperProps | shadcn/ui Paper API Docs | |||
| 198 | TableProps | ({ table }} => TableProps | shadcn/ui TableProps API Docs | |||
| 199 | ChipProps| ({ table }} => ChipProps | shadcn/ui Chip Props | |||
| 200 | AlertProps | ({ table }) => AlertProps | shadcn/ui Alert Props | |||
| 201 | BoxProps | ({ table }) => BoxProps | shadcn/ui Box Props | |||
Wanna see the source code for this table? Check it out down below!