Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Navigation

Pagination <pm-pagination>

Pagination. Give pages, or total items with page-size. Buttons by default; links with href-template.

Full screen

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/pagination'; </script> <pm-pagination pages="24" page="7"></pm-pagination>

Variants

Set with the variant attribute.

variant="full"
variant="simple"

Sizes

Set with the size attribute; controls keep touch-sized targets on phones.

size="sm"
size="md"
size="lg"

Tones

Set tone on the element, or data-tone on any ancestor to tone a whole area.

tone="accent"
tone="secondary"
tone="neutral"
tone="success"
tone="warning"
tone="danger"
tone="info"

States

Each state is one attribute.

Disabled

Attributes

AttributeTypeDefaultDescription
prev-label
prop: prevLabel
string—Text of the previous button (default "Previous"; its name is "Previous page"), for another language.
next-label
prop: nextLabel
string—Text of the next button (default "Next"; its name is "Next page").
pagenumber1Current page (1-based).
pagesnumber—Number of pages (or use total + page-size).
totalnumber—Total number of items.
page-size
prop: pageSize
number10Rows per page, used with total to count pages.
siblingsnumber1Pages shown either side of the current one.
boundariesnumber1Pages always shown at the start and end.
variant'full' | 'simple'fullsimple: Previous · Page x of y · Next.
href-template
prop: hrefTemplate
string—Render links, e.g. "?page={page}".
labelstringPaginationAccessible name (and visible label where the component shows one).
disabledbooleanfalseEvery page control is disabled (e.g. while a page loads).
size'sm' | 'md' | 'lg'—Control size.

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Events

EventReact / Svelte propDescription
pm-changeonPmChangePage changed.

Methods

goTo()