DocsAPI Reference

API Reference

Column Options

All the column options that can be used in Shadcn Table

Many of the column options you can pass here are the same as the ones that you can pass to the TanStack Table v9 ColumnDefs

Here is a list of all the column options you can specify in a column definition.

const columns = useMemo(
  () => [
    {
      accessorKey: 'name',
      header: 'Name',
      // All of the options you can specify here
    },
  ],
  [],
);

const table = useShadcnTable({ columns, data });

return <ShadcnTable table={table} />;
#
Column Option
Type
Default Value
More Info Links
1(originalRow: TData) => anyST Data Columns Docs
2string & keyof TDataST Data Columns Docs
3({ cell, column, row, table }) => ReactNode
4ST_AggregationFn<TData> | Array<ST_AggregationFn<TData>>'count'TanStack Table Grouping Docs
5({ cell, column, renderedCellValue, row, table }) => ReactNodeST Data Columns Docs
6Array<string>
7Array<ST_ColumnDef<TData>>
8({ cell, column, row, table }) => ReactNodeST Editing Docs
9DropdownOption[] | (({ cell, column, row, table, }) => DropdownOption[])
10'text' | 'select''text'
11boolean | 'context-menu' | ((cell: ST_Cell<TData>) => 'context-menu' | boolean)ST Click to Copy Docs
12booleanST Column Actions Docs
13boolean
14booleanST Column Filtering Docs
15booleanST Column Filtering Docs
16boolean
17boolean | (row) => boolean
18booleanST Column Filtering Docs
19boolean
20boolean
21boolean
22booleantrue
23boolean
24boolean
25boolean
26({ column, header, table }) => ReactNodeST Column Filtering Docs
27ST_FilterFn'fuzzy'
28Array<string | { label: string; value: string }>
29'text' | 'select' | 'multi-select' | 'range' | 'range-slider' | 'checkbox' | 'autocomplete' | 'date' | 'date-range' | 'datetime' | 'datetime-range' | 'time' | 'time-range''text'
30ReactNode | ({ column, footer, table }) => ReactNodeST Data Columns Docs
31(row: TData) => any)TanStack Table Grouping Docs
32({ cell, column, row, table }) => ReactNode
33boolean | number
34ReactNode | (({ column, header, table }) => ReactNode)ST Data Columns Docs
35stringTanStack Table ColumnDef Docs
36stringTanStack Table ColumnDef Docs
37booleanfalse
38number1000
39any{}
40number40
41({ cell, column, row, table }) => ReactNode
42{ cell, closeMenu, column, internalMenuItems, row, staticColumnIndex, staticRowIndex, table }) => ReactNode[]
43({ closeMenu, column, internalColumnMenuItems, table }) => ReactNode[]
44
45number180
46boolean
47SortFnOptionTanStack Table Sorting Docs
48'first' | 'last' | false | 1 | -1
49IconButtonProps | ({ column, table }) => IconButtonPropsshadcn/ui IconButton API
50IconButtonProps | ({ column, table }) => IconButtonPropsshadcn/ui IconButton API
51ButtonProps | ({ cell, column, row, table }) => ButtonPropsshadcn/ui Button API
52TextFieldProps | ({ cell, column, row, table }) => TextFieldPropsshadcn/ui TextField API
53AutocompleteProps | ({ column, rangeFilterIndex, table }) => AutocompletePropsshadcn/ui Date Picker Props
54CheckboxProps | ({ column, table }) => CheckboxPropsshadcn/ui Checkbox Props
55DatePickerProps | ({ column, rangeFilterIndex, table }) => DatePickerPropsshadcn/ui Date Picker Props
56DateTimePickerProps | ({ column, rangeFilterIndex, table }) => DateTimePickerPropsshadcn/ui Date Picker Props
57SliderProps | ({ column, table}) => SliderPropsshadcn/ui Slider Props
58TextFieldProps | ({ column, rangeFilterIndex, table }) => TextFieldPropsshadcn/ui TextField Props
59TimePickerProps | ({ column, rangeFilterIndex, table }) => TimePickerPropsshadcn/ui Date Picker Props
60TableCellProps | ({ cell, table }) => TableCellPropsshadcn/ui TableCell API
61TableCellProps | ({ column, table }) => TableCellPropsshadcn/ui TableCell API
62TableCellProps | ({ column, table }) => TableCellPropsshadcn/ui TableCell API
63booleantrueST Column Hiding Docs

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