Table

A responsive table component for displaying structured data with headers, body rows, footer, and an optional caption.

Demonstração

A list of recent invoices.
InvoiceStatusMethodAmount
INV-001PaidCredit Card$250.00
INV-002PendingBank Transfer$150.00
INV-003PaidPayPal$350.00
INV-004OverdueCredit Card$450.00
INV-005PaidStripe$550.00
Total$1,750.00

Props: TableRow

PropTipoPadrãoDescrição
stripedbooleanfalseApplies an alternating background to even rows for improved readability.

Uso

import {
  Table,
  TableHeader,
  TableBody,
  TableFooter,
  TableRow,
  TableHead,
  TableCell,
  TableCaption,
} from '@ghiberti85/ui'

<Table>
  <TableCaption>A list of recent invoices.</TableCaption>
  <TableHeader>
    <TableRow>
      <TableHead>Invoice</TableHead>
      <TableHead>Status</TableHead>
      <TableHead>Method</TableHead>
      <TableHead>Amount</TableHead>
    </TableRow>
  </TableHeader>
  <TableBody>
    <TableRow>
      <TableCell>INV-001</TableCell>
      <TableCell>Paid</TableCell>
      <TableCell>Credit Card</TableCell>
      <TableCell>$250.00</TableCell>
    </TableRow>
  </TableBody>
  <TableFooter>
    <TableRow>
      <TableCell colSpan={3}>Total</TableCell>
      <TableCell>$1,750.00</TableCell>
    </TableRow>
  </TableFooter>
</Table>

Ver no Storybook

Abrir no Storybook
Ghiberti UI — Design System