List and Pagination Controls
Payload's list controls support paginated data, page-size selection, sorting, and row selection. Use the standalone controls for custom data views and the provider-backed controls when extending an existing Admin list.
Import
Pagination
Pagination is controlled. Pass the current page metadata and update your query or local state from onChange.
The component returns null when both hasPrevPage and hasNextPage are false.
Page size
PerPage displays a compact selector for the number of rows shown on each page.
Reset the current page when changing the limit if the new page size would make that page invalid.
Sorting
SortColumnrenders ascending and descending controls for a named column.SortHeaderswitches an orderable list to its configured order field.SortRowrenders the drag handle used by an actively orderable list.
These controls read and update Payload's ListQuery context. Use them inside an Admin list or a custom view that provides the same list-query state.
Selection
SelectAlltoggles selection for the current list.SelectRowtoggles one row and respects document locking.SelectManyrenders an action pill for the current selection.
Selection controls require Payload's selection context. SelectRow also reads the authenticated user to determine whether a locked row can be selected.
Common props
These are the props most commonly used. See the exported types in @payloadcms/ui for the complete list.
Pagination props
Prop | Type | Default | Description |
|---|---|---|---|
| | — | Sets the current page. |
| | — | Sets the total page count. |
| | | Enables the next-page control. |
| | | Enables the previous-page control. |
| | — | Sets the page selected by the next control. |
| | — | Sets the page selected by the previous control. |
| | | Sets how many pages surround the current page. |
| | — | Runs when the user selects a different page. |
PerPage props
Prop | Type | Default | Description |
|---|---|---|---|
| | — | Sets the selected page size. |
| | — | Sets the available page sizes. |
| | | Provides a fallback when |
| | — | Runs when the user chooses a new page size. |
* An asterisk denotes that a prop is required.
Internal list wrappers
PageControls and PageControlsComponent are exported for Payload's own list views but are marked internal. For Custom Components, compose Pagination and PerPage unless you are intentionally extending Payload's existing list-query implementation.
Was this page helpful?