Skip to main content
Version: Next

Pagination API

import { Pagination } from '@editora/ui-react';

Props​

PropTypeDescription
ariaLabelstring
countnumber
headlessboolean
hrefTemplatestringRender the page controls as links: ?page={page} (any URL with {page}). Each link can be opened in a new tab; a normal click goes through onNavigate / NavigationProvider.
onChange(detail: PaginationChangeDetail) => void
onFirst(detail: PaginationChangeDetail) => void
onLast(detail: PaginationChangeDetail) => void
onNavigate(detail: ComponentNavigateDetail<{ page: number; previousPage: number }>) => voidBefore a link is followed. detail.preventDefault() keeps the page so your router handles detail.href; a surrounding NavigationProvider does this for every component at once.
onNext(detail: PaginationChangeDetail) => void
onPageChange(detail: PaginationChangeDetail) => void
onPrev(detail: PaginationChangeDetail) => void
pagenumber
size'sm' | 'md' | 'lg'
variant'default' | 'classic' | 'flat' | 'outline' | 'solid' | 'minimal' | 'contrast'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-pagination>​

Pagination renders the ui-pagination custom element from @editora/ui-core, which can also be used without React.

Attributes: aria-label, count, headless, href-template, page, size, variant

Events: change