Skip to main content

Pagination

Ant Design

The Pagination component is Ant Design's page switcher. It lets users move through long lists or query results a page at a time, and its page and page size can drive a query.

Properties​

Property
Description
Expected Value
CurrentThe page shown, counting from 1. A page past the last one shows the last page.Number. Default: 1
Page sizeNumber of items on each page.Number. Default: 1
TotalNumber of items across all pages. With Page size it sets how many pages there are.Number. Default: 50
Show size changerShows a dropdown where the user picks how many items a page holds.On or off. Default: Off
SimpleShows a compact switcher with previous and next arrows and a page number box instead of a button for each page.On or off. Default: Off
SizeSize of the page buttons.default, small. Default: default
Show totalText shown before the page buttons. {start}, {end} and {total} are replaced with the items shown and the total, as in {start}-{end} of {total} items.Text
AlignWhere the page buttons sit in the component's box.start, center, end. Default: end

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off
Dynamic heightLets the component grow with its content in the running app instead of keeping a fixed height.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On changeTriggers when the page or the page size changes.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
Go to pageGoes to the given Page. A page past the last one goes to the last page.components.pagination1.setCurrent("")
Set visibilityShows the component when true, hides it when false.components.pagination1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.pagination1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.pagination1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
currentThe page shown, counting from 1. A page past the last one shows the last page.{{components.pagination1.current}}
pageSizeNumber of items on each page.{{components.pagination1.pageSize}}
totalNumber of items across all pages. With Page size it sets how many pages there are.{{components.pagination1.total}}
showSizeChangerShows a dropdown where the user picks how many items a page holds.{{components.pagination1.showSizeChanger}}
simpleShows a compact switcher with previous and next arrows and a page number box instead of a button for each page.{{components.pagination1.simple}}
sizeSize of the page buttons.{{components.pagination1.size}}
showTotalText shown before the page buttons. {start}, {end} and {total} are replaced with the items shown and the total, as in {start}-{end} of {total} items.{{components.pagination1.showTotal}}
alignWhere the page buttons sit in the component's box.{{components.pagination1.align}}
isVisibleWhether the component is visible.{{components.pagination1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.pagination1.isLoading}}
isDisabledWhether the component is disabled.{{components.pagination1.isDisabled}}

Styles​

Style
Default
Primary colorTheme: Brand primary
Text colorTheme: Primary text
Container backgroundTheme: Surface 1
Border colorTheme: Default border
Border radius—
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.