Skip to content

Pagination ​

Pages

Loading...

Middle Page

Loading...

Pagination component enabling the user to select a specific page from a range of pages.

  • Tag: <flint-pagination>
  • Class: FlintPagination

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintPagination } from '@getufy/flint-ui';

Usage ​

html
<flint-pagination></flint-pagination>

Properties ​

PropertyAttributeTypeDefaultDescription
countcountnumber1Total number of pages.
pagepagenumber1The current page (1-based). Page 1 is the first page.
defaultPagedefault-pagenumber1Initial page for uncontrolled mode. Ignored after first render.
labellabelstring''Accessible label for the nav landmark (aria-label).
variantvariant'text' | 'outlined''text'Visual style variant of the pagination buttons.
shapeshape'circular' | 'rounded' | 'square''circular'Shape of the pagination buttons.
sizesizeSize'md'Size of the pagination buttons.
colorcolor'primary' | 'secondary' | 'standard''primary'Color theme of the pagination buttons.
showFirstButtonshow-first-buttonbooleanfalseShow first-page button.
showLastButtonshow-last-buttonbooleanfalseShow last-page button.
hidePrevButtonhide-prev-buttonbooleanfalseHide previous button.
hideNextButtonhide-next-buttonbooleanfalseHide next button.
siblingCountsibling-countnumber1Number of sibling pages around the current page.
boundaryCountboundary-countnumber1Number of pages always shown at start and end.
disableddisabledbooleanfalseDisable the whole component.

Events ​

EventDetailDescription
flint-pagination-change&#123; page: number &#125;Fired when the active page changes. detail: &#123; page: number &#125;

Slots ​

NameDescription
prev-iconIcon for the previous button (default: chevron left SVG).
next-iconIcon for the next button (default: chevron right SVG).
first-iconIcon for the first button (default: skip-to-start SVG).
last-iconIcon for the last button (default: skip-to-end SVG).
ellipsis-iconIcon for ellipsis items (default: three-dot SVG).

CSS Parts ​

NameDescription
baseThe component's base wrapper element.
buttonThe button element.

CSS Custom Properties ​

PropertyDefault
--flint-pagination-gap4px
--flint-pagination-btn-size36px
--flint-pagination-btn-radius4px
--flint-pagination-btn-font-size0.875rem
--flint-pagination-focus-ring-colorvar(--flint-primary-color
--flint-pagination-active-bgvar(--flint-primary-color
--flint-pagination-active-colorvar(--flint-text-color-on-primary
--flint-pagination-disabled-opacity0.38
--flint-pagination-outlined-bordervar(--flint-border-color
--flint-pagination-outlined-hover-bgvar(--flint-primary-color-light
--flint-pagination-outlined-hover-bordervar(--flint-primary-color
--flint-pagination-active-bg-secondaryvar(--flint-secondary-color
--flint-pagination-active-color-secondaryvar(--flint-text-color-on-secondary
--flint-pagination-active-bg-standardvar(--flint-text-color
--flint-pagination-btn-radius-rounded8px
--flint-pagination-btn-size-sm28px
--flint-pagination-btn-font-size-sm0.8125rem
--flint-pagination-btn-size-lg44px
--flint-pagination-btn-font-size-lg0.9375rem
--flint-font-family—
--flint-text-color—
--flint-hover-color—
--flint-text-color-muted—