Data table: Pinned columns
The selection column and the first data column are pinned by default. Choose your own with pinStart. A soft shadow marks the edge once the table scrolls sideways.
| Method | Country | |||||
|---|---|---|---|---|---|---|
| [email protected] | Card | United States | 2026-01-01 | $5.00 | ||
| [email protected] | PayPal | Japan | 2026-02-02 | $84.20 | ||
| [email protected] | Bank | Germany | 2026-03-03 | $163.40 | ||
| [email protected] | Apple Pay | Brazil | 2026-04-04 | $242.60 | ||
| [email protected] | Card | India | 2026-05-05 | $321.80 | ||
| [email protected] | PayPal | United States | 2026-06-06 | $401.00 | ||
| [email protected] | Bank | Japan | 2026-07-07 | $480.10 | ||
| [email protected] | Apple Pay | Germany | 2026-08-08 | $559.30 | ||
| [email protected] | Card | Brazil | 2026-09-09 | $638.50 | ||
| [email protected] | PayPal | India | 2026-01-10 | $717.70 |
0 of 12 rows selected
Page 1 of 2
This adds the example as components/examples/data-table/pinned-columns.tsx, together with the Data table component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/data-table-pinned-columns.jsonTo add only the component, follow the Data table installation.
Props in this example
The Data table props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
tableThe table returned by useDataTable. | DataTableInstance<TData> | – |
| Prop | Type | Default |
|---|---|---|
pinStartColumn ids to pin to the start edge. | string[] | ["select", firstColumnId] |
| Prop | Type | Default |
|---|---|---|
placeholder | string | "Search…" |
| Prop | Type | Default |
|---|---|---|
column | Column | – |
title | string | – |
| Prop | Type | Default |
|---|---|---|
table | Table | – |
| Prop | Type | Default |
|---|---|---|
row | Row | – |
Every prop is in the Data table API reference.
See them all, with keyboard support and accessibility notes, on the Data table page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- CheckboxA checkbox whose check draws in, with indeterminate parents, groups and labels that share its hover.
- SkeletonPlaceholders that wait 150ms before showing, take the exact size of the content they wrap, and fade it in without moving anything.
- TableA responsive table with a surface style, wrapping or compact cells, sticky headers, pinned columns and scroll hints.
- AvatarUser photos with an initials fallback, status badges and stacked groups that collapse into a count.
- BadgeStatus labels with colored dots, removable tags that slide closed and counts that roll to their new value.