Shadcn React Table

Search documentation

Search the docs

Icons

Every glyph the table renders is a named slot. Override any subset via useDataTable({ icons }) (or app-wide via DataTableConfigProvider) to swap icon libraries or individual icons. Each value is an IconComponent — any component accepting a className.

tsx
import { ArrowUp, ArrowDown, MoreVertical } from "lucide-react"

const table = useDataTable({
  data,
  columns,
  icons: {
    sortAscending: ArrowUp,
    sortDescending: ArrowDown,
    columnActions: MoreVertical,
  },
})

See the Custom icons guide for swapping the whole set. The complete slot list and Remix Icon defaults:

SlotTypeDefaultDescription
sortAscending#IconComponentArrowUpHeader sort indicator: sorted ascending.
sortDescending#IconComponentArrowDownHeader sort indicator: sorted descending.
sortUnsorted#IconComponentChevronsUpDownHeader sort indicator: sortable but not sorted.
columnActions#IconComponentMoreVerticalColumn-actions menu trigger in each header.
filter#IconComponentFilterFilter toggle and filter menu items.
filterOff#IconComponentFilterXHide-filters state of the filter toggle and clear-filter items.
advancedFilter#IconComponentListFilterAdvanced filter panel toggle.
clearAll#IconComponentRotateCcwShow-all-columns reset action in the column menu.
clearSort#IconComponentListXClear-sort item in the column menu. When not overridden but `clearAll` is, it uses your `clearAll`.
clearFilter#IconComponentFilterXClear-filter item in the column menu. When not overridden but `filterOff` is, it uses your `filterOff`.
hide#IconComponentEyeOffHide-column menu item.
pin#IconComponentPinGeneric pin glyph. Any of `pinLeft`, `pinRight`, `pinTop` and `pinBottom` you don't override falls back to this one, unrotated.
pinLeft#IconComponentPinLeftPin-column-to-the-left menu item. The default needle points left.
pinRight#IconComponentPinRightPin-column-to-the-right menu item. The default needle points right.
pinTop#IconComponentPinPin-row-to-the-top button while the row is unpinned. The default is the plain pin.
pinBottom#IconComponentPinPin-row-to-the-bottom button while the row is unpinned (used when `rowPinningDisplayMode` is `"bottom"`). The default is the plain pin.
pinnedRow#IconComponentPinShown on a pinned row's pin button.
unpin#IconComponentPinOffUnpin column and unpin row actions.
group#IconComponentGroupGroup-by menu item and grouping chips.
columnVisibility#IconComponentColumns3Column-visibility (show/hide columns) toolbar button.
density#IconComponentRows3Density toggle toolbar button.
fullscreenEnter#IconComponentMaximize2Full-screen toggle while not full screen.
fullscreenExit#IconComponentMinimize2Full-screen toggle while full screen.
clear#IconComponentXClear buttons (search box, filter inputs, grouping chips).
pageFirst#IconComponentChevronsLeftPagination: first page. Mirrored in right-to-left tables.
pagePrev#IconComponentChevronLeftPagination: previous page. Mirrored in right-to-left tables.
pageNext#IconComponentChevronRightPagination: next page. Mirrored in right-to-left tables.
pageLast#IconComponentChevronsRightPagination: last page. Mirrored in right-to-left tables.
expanded#IconComponentChevronDownExpand control of an expanded row or group.
collapsed#IconComponentChevronRightExpand control of a collapsed row or group. Mirrored in right-to-left tables.
dragHandle#IconComponentGripVerticalDrag grip for column and row reordering.
edit#IconComponentPencilEdit row / edit cell action.
copy#IconComponentCopyCopy action in the cell menu.
save#IconComponentCheckSave action while editing a row.
cancel#IconComponentXCancel action while editing a row.
calendar#IconComponentCalendarDate filter field trigger.