Skip to content
Data Display

Table

A composable table built from semantic HTML elements with consistent styling. Use the sub-components to build tables of any shape.

InvoiceStatusMethodAmount
INV-001PaidCredit Card$250.00
INV-002PendingPayPal$150.00
INV-003UnpaidBank Transfer$350.00
INV-004PaidCredit Card$450.00

Import

import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@mikenotthepope/substrateui"

Composition

Table
├── TableHeader
│   └── TableRow
│       └── TableHead
└── TableBody
    └── TableRow
        └── TableCell

API Reference

Table

PropTypeDefaultDescription
classNamestringAdditional CSS classes to apply to the table element.

TableHeader

PropTypeDefaultDescription
classNamestringAdditional CSS classes for the thead element.

TableHead

PropTypeDefaultDescription
classNamestringAdditional CSS classes for the th element.

TableBody

PropTypeDefaultDescription
classNamestringAdditional CSS classes for the tbody element.

TableRow

PropTypeDefaultDescription
classNamestringAdditional CSS classes for the tr element.

TableCell

PropTypeDefaultDescription
classNamestringAdditional CSS classes for the td element.