BrowsePagination

Navigation

Glass Pagination

Page numbers with previous and next, condensing long ranges so the row stays short.

Preview

Installation

Install the package once, then import the parts you use into a standalone component.

Install

npm install ngx-vitreo @angular/cdk @floating-ui/dom
Import

import { GlassPagination } from 'ngx-vitreo';

@Component({
  imports: [GlassPagination],
  // ...
})

Usage

Usage

<glass-panel class="cpreview-bar" variant="pill">
  <nav glassPagination [page]="page()" (pageChange)="go($event)" [pageCount]="12" [siblingCount]="0"></nav>
</glass-panel>

API reference

GlassPagination

nav[glassPagination], glass-pagination

InputTypeDefaultDescription
[(page)]numberNoneThe current page, counting from 1. Values outside 1 to pageCount are clamped. Required.
(pageChange)numberNoneEmits the page to show.
pageCountnumberNoneHow many pages there are. Required.
siblingCountnumber1Pages shown on each side of the current page.
boundaryCountnumber1Pages always shown at each end.
previousLabelstring'Previous page'Accessible name of the previous button.
nextLabelstring'Next page'Accessible name of the next button.