Back to components
Dashboard component

Data Table

Horizontally scrollable, sortable mobile data table with custom cell renderers.

Install

What it does

  • Per-column fixed widths; auto horizontal scroll when total > viewport
  • Tap header to toggle sort (asc/desc)
  • Custom cell renderers with left/center/right alignment
  • Sticky header, empty state, optional row press

When to use

Use it

Admin orders list, transaction history, attendance, lineups.

Skip it

Long content rows (use a card list instead — tables don't read well on phones with >7 cols).

Files & routes added

  • components/dashboard/data-table.tsx

Related components