React

Pagination

The pagination component is used to navigate pages in lists, tables, and other content views. Related design guidelines: Lists and tables

ExamplesProps

Examples

Pagination top

Copied to clipboard

Pagination bottom

Copied to clipboard

Props

Pagination Props

The Pagination component accepts the following props.

NameTypeRequiredDefaultDescription
childrennodenullWhat should be rendered inside
classNamestring''Additional classes for the container.
variantenum'top'Position where pagination is rendered.
perPagenumberdefaultPerPageOptions[0].valueNumber of items per page.
perPageOptionsarrayOf[ { title: '10', value: 10 }, { title: '20', value: 20 }, { title: '50', value: 50 }, { title: '100', value: 100 } ]Select from options to number of items per page.
itemCountnumberTotal number of items.
pagenumber1Current page number.
itemsStartnumbernullFirst index of items on current page.
itemsEndnumbernullLast index of items on current page.
widgetIdstring'pagination-options-menu'ID to ideintify widget on page.
dropDirectionenumDropdownDirection.downDirection of dropdown context menu.
titlesshape{ items: 'items', pages: 'pages', itemsPerPage: 'Items per page', perPageSuffix: 'per page', toFirstPage: 'Go to first page', toPreviousPage: 'Go to previous page', toLastPage: 'Go to last page', toNextPage: 'Go to next page', optionsToggle: 'Select', currPage: 'Current page', paginationTitle: 'Pagination' }Object with titles to display in pagination.
toggleTemplateunionToggleTemplateThis will be shown in pagination toggle span. You can use firstIndex, lastIndex, itemCount, itemsTitle props.
onSetPagefunc() => undefinedFunction called when user sets page.
onFirstClickfunc() => undefinedFunction called when user clicks on navigate to first page.
onPreviousClickfunc() => undefinedFunction called when user clicks on navigate to previous page.
onNextClickfunc() => undefinedFunction called when user clicks on navigate to next page.
onLastClickfunc() => undefinedFunction called when user clicks on navigate to last page.
onPageInputfunc() => undefinedFunction called when user inputs page number.
onPerPageSelectfunc() => undefinedFunction called when user selects number of items per page.