PatternFly · @patternfly/react-table
PatternFly Table
Data tables for tools (sortable/selectable when hydrated). Reports use the editorial Table.
- Import
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'- Use on
- tools
- Upstream docs
PatternFly’s Table for tool surfaces. Server-rendered here (no sorting without hydration); inside a React island it gains sorting, selection and expansion. Reports use the editorial Table.
Compact table
| Year | Mean (ppm) | Increase (ppm) |
|---|---|---|
| 2023 | 421.08 | 3.32 |
| 2024 | 424.61 | 3.33 |
| 2025 | 427.35 | 2.23 |
Code
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
<Table variant="compact" aria-label="Annual means">
<Thead><Tr><Th>Year</Th><Th>Mean (ppm)</Th><Th>Increase</Th></Tr></Thead>
<Tbody>{rows.map(r => <Tr><Td>{r[0]}</Td><Td>{r[1]}</Td><Td>{r[2]}</Td></Tr>)}</Tbody>
</Table>