Dashral Pro is on the wayGet 30% off at launch

Dashral

Table

A responsive table for tabular data.

$ pnpm dlx shadcn@latest add https://dashral.com/r/table.json
A list of your recent invoices.
InvoiceStatusMethodAmount
INV-001PaidCredit card$250
INV-002PendingPayPal$150
INV-003UnpaidBank transfer$350
Total$750

Installation

$ pnpm dlx shadcn@latest add https://dashral.com/r/table.json

Adds the component, the components it builds on, its npm packages and the theme tokens it uses. Using Dashral often? Add the registry to components.json once:

components.json
{
  "registries": {
    "@dashral": "https://dashral.com/r/{name}.json"
  }
}

Then add components by name:

$ pnpm dlx shadcn@latest add @dashral/table

Usage

example.tsx
import { Table, TableHeader, TableBody, TableHead, TableRow, TableCell, TableCaption } from "@/components/dashral/table"

<Table>
  <TableCaption>Recent invoices</TableCaption>
  <TableHeader>
    <TableRow>
      <TableHead>Invoice</TableHead>
      <TableHead className="text-right">Amount</TableHead>
    </TableRow>
  </TableHeader>
  <TableBody>
    {invoices.map((invoice) => (
      <TableRow key={invoice.id}>
        <TableCell>{invoice.id}</TableCell>
        <TableCell className="text-right tabular-nums">{invoice.amount}</TableCell>
      </TableRow>
    ))}
  </TableBody>
</Table>

Examples

Recent orders

Avatars, status badges and a menu of actions on each row; the row lights up under the pointer.

OrderCustomerProductStatusDateAmountActions
#1042
Olivia Martinolivia@acme.com
Retro 35mm Film CameraPaidOct 16$159.00
#1041
Liam Johnsonliam@acme.com
Pour-over Coffee SetShippedOct 15$64.50
#1040
Budi Santosobudi@nusantara.id
Mechanical KeyboardProcessingOct 15$219.00
#1039
Sofia Davissofia@acme.com
Linen Desk MatRefundedOct 14$39.00

Bulk actions

Tick rows (or click them) and a bar with actions for the selection appears; archiving can be undone.

5 accounts · tick rows to act on several at once
CompanyPlanSeatsRenews
Acme Inc.Team24Nov 2, 2026
PT NusantaraPro8Nov 9, 2026
GlobexFree3—
InitechPro12Dec 1, 2026
Umbrella Co.Team40Dec 14, 2026

API reference

Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption

Styled table elements; the table scrolls sideways when it doesn't fit.

Also takes every prop of <table>(opens in a new tab).

Accessibility

  • Real table semantics: use TableHead for headers and a TableCaption (visually hidden is fine) to name the table.