@spartanfx/react v1.2.2
@spartanfx/react / index / IPagerProps
Interface: IPagerProps
Props for the Pager component.
Properties
Required
| Property | Type | Default | Description |
|---|
children | (itemsOnPage) => ReactNode | - | Render function receiving the current page's items |
items | any[] | - | Array of items to paginate |
numberOfItemsPerPage | number | - | Number of items to display per page |
Options
| Property | Type | Default | Description |
|---|
ariaLabelNext? | string | - | Accessible label for the next page button |
ariaLabelPrevious? | string | - | Accessible label for the previous page button |
layout? | PagerLayout | - | Layout variant controlling visible UI elements |
totalItems? | number | - | Server-side total item count. When provided, overrides items.length for computing the number of pages. Use this when the full dataset lives on the server and only one page of items is loaded at a time. |
Events & callbacks
| Property | Type | Default | Description |
|---|
onPageChange? | (page) => void | - | Callback fired when the user navigates to a different page. Use this to trigger server-side data fetching for the requested page. |
Appearance & theming
| Property | Type | Default | Description |
|---|
appearance? | AppearanceMode | AppearanceMode.light | Visual appearance mode - light or dark theme support. |
className? | string | - | Additional CSS class name for the root element. |
classNames? | IPagerClassNames | - | CSS class name overrides for component elements. |
style? | CSSProperties | - | Inline styles for the root element. |
tokens? | IPagerTokens | - | Design tokens for theming. |