pagination() renders previous/next controls, page numbers, and total item counts. Clicking a page dispatches an action payload ({page, per_page}) to your page action handler.
pagination()
{page, per_page}
<ComponentPreview title="Pagination (click a page number)">
{
"type": "pagination",
"total": 120,
"page": 2,
"per_page": 20,
"action": "paginate"
}
</ComponentPreview>
<Tabs>
<Tab title="Python">
</Tab>
<Tab title="YAML">
</Tabs>
| Parameter | Type | Description |
|---|---|---|
| total | int | Total number of records across all pages. |
total
int
| page | int | Current 1-based page number. |
page
| per_page | int | Number of rows per page (default 20). |
per_page
20
| action | str | Optional action name sent when the user changes page. |
action
str