Skip to content

Pagination

The bq-pagination component provides page navigation with previous/next buttons, numbered pages, and ellipsis for large page ranges.

Basic Usage

html
<bq-pagination page="1" total="10"></bq-pagination>

With Sibling Count

html
<bq-pagination page="5" total="20" sibling-count="2"></bq-pagination>

Disabled

html
<bq-pagination page="1" total="10" disabled></bq-pagination>

Properties

PropertyTypeDefaultDescription
pagenumber1Current page (1-based)
totalnumber1Total number of pages
sibling-countnumber1Number of visible sibling pages on each side
disabledbooleanfalseDisables all interactions

Events

EventDetailDescription
bq-page-change{ page: number }Fired when a page is selected

CSS Parts

PartDescription
navThe <nav> wrapper
paginationThe inner button container

Accessibility

  • Wrapped in <nav> with an aria-label.
  • The current page button has aria-current="page".
  • Previous and next buttons are automatically disabled at the boundaries.

Released under the MIT License.