Skip to content
Uxelith
Sign in
Prov1.0.0Data

Data Table

A real, accessible table with natural sorting where rows glide into place, highlighted search, pagination, drawn checkboxes and a bulk-action bar. Typed columns, custom cells, two densities.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
9 Oct 2026
Live

Installation

Usage

example.tsx
"use client"

import { DataTable } from "@/components/data-table"

type User = { id: string; name: string; role: string; joined: Date }

const users: User[] = [
  { id: "1", name: "Ada Lovelace", role: "Admin", joined: new Date("2026-01-12") },
  { id: "2", name: "Grace Hopper", role: "Editor", joined: new Date("2026-03-04") },
]

export function Users() {
  return (
    <DataTable
      caption="Team members"
      data={users}
      getRowId={(u) => u.id}
      selectable
      columns={[
        { id: "name", header: "Name", sortable: true },
        { id: "role", header: "Role", sortable: true },
        { id: "joined", header: "Joined", sortable: true, searchable: false },
      ]}
    />
  )
}

Props

PropTypeDefaultDescription
dataT[]—Rows.
columnsDataTableColumn<T>[]—id, header, accessor?, cell?, sortable?, searchable?, align?, width?.
getRowId(row: T) => stringrow.idStable id per row, used for selection and as the React key.
captionstring—Names the table (shown with showCaption).
pageSizenumber10Rows per page; 0 shows all.
selectablebooleanfalseRow checkboxes and select-all.
selected / onSelectedChangestring[] / (ids) => void—Control selection yourself.
defaultSort{ id; direction }—Initial sort.
selectionActions(rows: T[]) => ReactNode—Toolbar content while rows are selected.
--table-accentCSS variable--primarySelection colour.
toolbarbooleantrueShow the search box and row count; turn off for small fixed tables.
density"comfortable" | "compact""comfortable"Row height.

Accessibility

  • A real <table> with a caption, column headers and aria-sort on sortable columns.
  • Sort controls are buttons; sorting, page changes and search result counts are announced.
  • Row checkboxes are labelled by the row; select-all becomes indeterminate for partial pages.
  • Wide tables scroll inside a keyboard-focusable, labelled region.
  • Checkboxes are native inputs (drawn over, not replaced); sort glides are skipped under prefers-reduced-motion.

Changelog

  1. v1.0.0Latest

    First release.

More in Data

All 9 in Data
  • DataPro

    Area Chart

    Trends over time: lines draw themselves in, the crosshair glides between points, the area you've scrubbed stays bright, and the tooltip shows the change from the point before.

  • DataFree

    Avatar Stack

    Overlapping avatars that spread on hover, with a name tooltip that swings with the pointer, status dots and a +N list of everyone else. Photos or initials.

  • DataPro

    Bar Chart

    A responsive bar chart, grouped or stacked: bars rise in one after another, the hovered column lights up and the tooltip glides, with keyboard navigation and a hidden data table.