Skip to main content

IPagerProps

@spartanfx/react v1.2.2


@spartanfx/react / index / IPagerProps

Interface: IPagerProps

Props for the Pager component.

Properties

Required

PropertyTypeDefaultDescription
children(itemsOnPage) => ReactNode-Render function receiving the current page's items
itemsany[]-Array of items to paginate
numberOfItemsPerPagenumber-Number of items to display per page

Options

PropertyTypeDefaultDescription
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

PropertyTypeDefaultDescription
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

PropertyTypeDefaultDescription
appearance?AppearanceModeAppearanceMode.lightVisual 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.