Getting Started
Foundations
Components
Search for a command to run...
Tables organize and present data in a grid format, making it easy to scan, compare, and analyze information across multiple dimensions. They use semantic HTML table elements to ensure proper accessibility and screen reader support. Tables are particularly effective for displaying datasets where relationships between different data points are important, such as financial data, inventory lists, comparison charts, or any structured information that benefits from tabular presentation.
Use tables when data relationships and comparisons are important to understanding the information. For simpler lists or when mobile responsiveness is critical, consider using list components or card layouts instead. Tables should include clear headers, maintain consistent column widths, and provide appropriate visual hierarchy to guide users through the data.
| Invoice | Status | Method | Amount |
|---|---|---|---|
| INV001 | Paid | Credit Card | $250.00 |
| INV002 | Pending | PayPal | $150.00 |
| INV003 | Unpaid | Bank Transfer | $350.00 |
import { Table } from "@strongtie/design-system/table"This module exports the following components:
TableTableHeaderTableBodyTableFooterTableHeadTableRowTableCellTableCaptionAll components accept standard HTML attributes and React props.
| Invoice | Status | Method | Amount |
|---|---|---|---|
| INV001 | Paid | Credit Card | $250.00 |
| INV002 | Pending | PayPal | $150.00 |
| INV003 | Unpaid | Bank Transfer | $350.00 |
| Invoice | Status | Method | Amount |
|---|---|---|---|
| INV001 | Paid | Credit Card | $250.00 |
| INV002 | Pending | PayPal | $150.00 |
| INV003 | Unpaid | Bank Transfer | $350.00 |
| INV004 | Paid | Credit Card | $450.00 |
| INV005 | Paid | PayPal | $550.00 |
| INV006 | Pending | Bank Transfer | $200.00 |
| INV007 | Unpaid | Credit Card | $300.00 |
| Total | $2,500.00 | ||
| Name | Role | Status | |
|---|---|---|---|
| John Doe | john@example.com | Admin | active |
| Jane Smith | jane@example.com | User | active |
| Bob Johnson | bob@example.com | User | inactive |
| Alice Williams | alice@example.com | Editor | active |
| Product | Category | Price | Quantity | Status |
|---|---|---|---|---|
| Laptop | Electronics | $999.99 | 5 | In Stock |
| Mouse | Accessories | $29.99 | 150 | In Stock |
| Keyboard | Accessories | $79.99 | 0 | Out of Stock |
| Monitor | Electronics | $299.99 | 12 | In Stock |
| Webcam | Electronics | $89.99 | 8 | In Stock |
Components can be styled using the className prop. The design system uses Tailwind CSS for styling.
CSS classes used by this component:
tabletable-bodytable-captiontable-celltable-footertable-headtable-headertable-rowEnsure proper accessibility attributes are added when implementing this component.