Table: Sticky header
stickyHeader keeps the header in view in a height-limited table, and adds a hairline under it once rows scroll beneath.
| Event | Type | When |
|---|---|---|
| evt_400 | deploy | 2 min ago |
| evt_401 | rollback | 9 min ago |
| evt_402 | scale | 16 min ago |
| evt_403 | restart | 23 min ago |
| evt_404 | deploy | 30 min ago |
| evt_405 | rollback | 37 min ago |
| evt_406 | scale | 44 min ago |
| evt_407 | restart | 51 min ago |
| evt_408 | deploy | 58 min ago |
| evt_409 | rollback | 65 min ago |
| evt_40a | scale | 72 min ago |
| evt_40b | restart | 79 min ago |
| evt_40c | deploy | 86 min ago |
| evt_40d | rollback | 93 min ago |
| evt_40e | scale | 100 min ago |
| evt_40f | restart | 107 min ago |
| evt_410 | deploy | 114 min ago |
| evt_411 | rollback | 121 min ago |
| evt_412 | scale | 128 min ago |
| evt_413 | restart | 135 min ago |
| evt_414 | deploy | 142 min ago |
| evt_415 | rollback | 149 min ago |
| evt_416 | scale | 156 min ago |
| evt_417 | restart | 163 min ago |
This adds the example as components/examples/table/sticky.tsx, together with the Table component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/table-sticky.jsonTo add only the component, follow the Table installation.
Props in this example
The Table props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
variantsurface adds a rounded hairline frame and a muted header band. | "default" | "surface" | "default" |
stickyHeaderKeep the header in view. Give the container a max height through containerClassName. | boolean | false |
containerClassNameClasses for the scroll container. | string | – |
| Prop | Type | Default |
|---|---|---|
alignend also switches to tabular numbers so digits line up. | "start" | "center" | "end" | "start" |
| Prop | Type | Default |
|---|---|---|
alignend also switches to tabular numbers so digits line up. | "start" | "center" | "end" | "start" |
Every prop is in the Table API reference.
See them all, with keyboard support and accessibility notes, on the Table page.
- 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.
- CardA surface for grouping content, with three variants, edge-to-edge media, concentric radii and whole-card links.
- ChartRecharts charts with themed colors, a tooltip and legend that read labels from one config, and keyboard navigation with a visible focus ring.
- Data tableA table for real data, with sorting, search, row selection, pinned columns, a sticky header and pagination.
- ItemA row of media, text and actions for lists, settings and pickers, with a grouped surface and a hover highlight that glides between rows.