Skip to main content

Pagination

TkPagination component description.

import { TkPagination } from '@takeoff-ui/react'

Basic​

The basic usage of TkPagination.

View Code
<TkPagination totalItems={50} rowsPerPage={10} />

Design​

grouped, outlined, and text are available.


View Code
<TkPagination totalItems={50} rowsPerPage={10} type="outlined" />

Mode​

compact, compact-expanded are available.


View Code
<TkPagination totalItems={50} rowsPerPage={10} mode="compact" />

API​

Props​

NameTypeDefaultDescription
number1The current page of the pagination.
"compact", "compact-expanded"nullThe mode of the pagination
booleanfalseWhether the pagination elements should have rounded corners
number10Number of items per page.
number[][5, 10, 20, 50]Number of items per page options
number0Number of total items.
"grouped", "outlined", "text"'outlined'The type of the pagination

Events​

NameDescription
tk-next-pagePagination next button click event
tk-page-changePagination page change event
tk-prev-pagePagination prev button click event
tk-rows-per-page-changeRowsPerPage change event