Using Grommet for HPE?See Pagination examples and guidance.
Custom label to be used by screen readers. When provided, an aria-label will be added to the element.
string
"a user friendly label for screen readers"
How to align along the cross axis when contained in a Box or along the column axis when contained in a Grid.
string
"start"
"center"
"end"
"stretch"
"baseline"
The amount of margin around the component.
string
"none"
"xxsmall"
"xsmall"
"small"
"medium"
"large"
"xlarge"
object
Can be specified to distinguish horizontal margin, vertical margin, and margin on a particular side.
{ vertical: "...", horizontal: "...", top: "...", bottom: "...", left: "...", right: "..." }
Function called when the user clicks a page or arrow button.
function
The single argument is an event containing the target page via 'event.page', and the startIndex and endIndex for items contained in the target page via 'event.startIndex' and 'event.endIndex', respectively.
({ page, startIndex, endIndex }) => {...}
The default page. If used with onChange, it can be used to control the active page via state.
number
1
Display a Select component where the user can choose the number of items per page that they would like to view.
boolean
true
false
object
{10, 25, 50, 100}
At its core, the Pagination component is a regular <nav> element. Thus, both DOM and React properties, methods, and events are accessible. To read up on all of the possible DOM attributes and types available for nav elements, check out this MDN Web Documents page. To learn more about DOM events and methods, you can read more on the MDN Web Events documentation page.
Also, feel free to read about the types of React events available, or see how DOM attributes change in React. Working in tandem with Styled Components, you also have access to the as property.
Any additional style for the Box wrapping the pagination controls.
string
Any CSS.
css`color: 'blue'`
function
(props) => {}
How the pagination controls should be aligned within the containing Box.
string
"center"
Direction in which the containing Box should display the pagination controls.
string
"row"
The color used for the icon.
string
A hex, name, or rgb value.
"brand"
object
An object with a color for dark and light modes.
{ dark: "string", light: "string" }