Components

Table

A structured layout for displaying tabular data.

Loading...

Installation

NPM packages are currently unstable and may cause issues. Use it at your own risk.
npm install @mijn-ui/react-table

Usage

import {
  Table,
  TableBody,
  TableCaption,
  TableCell,
  TableHeader,
  TableHeaderCell,
  TableRow,
} from "@mijn-ui/react-table"
<Table>
  <TableCaption>A list of your recent invoices.</TableCaption>
  <TableHeader>
    <TableRow>
      <TableHeaderCell className="w-[100px]">Invoice</TableHeaderCell>
      <TableHeaderCell>Status</TableHeaderCell>
      <TableHeaderCell>Method</TableHeaderCell>
      <TableHeaderCell className="text-right">Amount</TableHeaderCell>
    </TableRow>
  </TableHeader>
  <TableBody>
    <TableRow>
      <TableCell className="font-medium">INV001</TableCell>
      <TableCell>Paid</TableCell>
      <TableCell>Credit Card</TableCell>
      <TableCell className="text-right">$250.00</TableCell>
    </TableRow>
  </TableBody>
</Table>

Table Style Slots

Slot NameTargeted ComponentPurpose
baseTableStyles the root table component.
headerTableHeaderStyles the table header.
bodyTableBodyStyles the table body.
footerTableFooterStyles the table footer.
rowTableRowStyles table rows.
headerCellTableHeaderCellStyles individual header cells.
cellTableCellStyles individual cells.
captionTableCaptionStyles the table caption.