Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Table

The Table component renders Payload's responsive table structure and styles. Columns define their heading and provide one rendered cell for each row.

Import

1
import { Table } from '@payloadcms/ui'
2
import type { ClientField, Column } from 'payload'

Basic usage

Loading component example…

Keep each column's renderedCells array in the same order as data. Columns with active: false are omitted from the table.

Rendering cells

renderedCells accepts React nodes, so simple custom tables can format values directly. Payload also exports DefaultCell for rendering values from Payload field configurations. DefaultCell expects the Config and Translation providers available inside the Admin Panel.

Common props

These are the props most commonly used with this component. See its exported types in @payloadcms/ui for the complete list.

Prop

Type

Default

Description

data *

Record<string, unknown>[]

Rows rendered by the table.

columns

Column[]

Defines headings, fields, and rendered cell content.

appearance

'default' | 'condensed'

'default'

Selects the table's spacing and border treatment.

BeforeTable

ReactNode

Renders content immediately before the table.

* An asterisk denotes that a prop is required.

Was this page helpful?

Next

Thumbnail