Last updated 1 year ago
Pagination component
Since: 6.0.0 (3.12.0)
import {UIPagination} from 'writer' render($$) { const el = $$('div') return el.append( $$(UIPagination, { currentPage: 1, totalPages: 10, onPageChange: (pageNumber) => { console.info(`You are now on page ${pageNumber}`) } }) ) }
currentPage
int
Required - Current page number, not zero-indexed
totalPages
Required - Number of total pages
onPageChange
function
Required - Callback function fires when current page is changed