Browse documentation
Pagination
Navigate large result sets one page at a time.
Import
Load the optional component layer before using the examples below.
Ruby
require "zaniah/ui"Example
Pass a one-based current page and total page count. on_change receives the requested page.
Rendered example

Ruby
Zaniah::UI::Pagination.new(page: 4, pages: 12)
.on_change { |page| puts page }
API summary
Constructor options and behaviors are drawn from the component reference.
| Component | Constructor and methods | Variants or behavior |
|---|---|---|
Pagination | (page:, pages:, window:); on_change | previous/window/next |
Accessibility
Pagination is a navigation region with previous, numbered, and next controls.
| Component | Semantic role |
|---|---|
Pagination | navigation |