Pagination
Page navigation component for data sets. Supports numbered pages with ellipsis gaps, simple prev/next navigation, and cursor-based load-more patterns. Integrates with Turbo Frames for seamless page transitions.
Numbered
Full pagination with page numbers, ellipsis gaps, prev/next arrows, and per-page size selector
_pagination.html.erb
███
██████████ █████████ █ ████████ █████ █████████
██████
███ ██████ █████████████████████████████████
█████████████ ██
████████████ ███
█████████ █████████
████████████ █ ██
pagination_controller.js
██████ █ ██████████ █ ████ ████████████████████
██ ████████ ██ ████████████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ ██████████ ██████████ █████████████
██████ ██████ █ █ ████████ ████████ █████████ ███████ █
█████████ █
██ ███████████████████ ██ █████████████████████ █
█████████████ █ ███ █████████████████████
pagination_numbered_component.html.erb
████ ███████████████████████ ███████████ ████████████ ██████████████ ███████
███ ████████ █████ ██
██ ██ ██████████████ ██
█████ ██████████ ███████████████████████ ███ ████████████████████ ████████████████████ ██████
████ ██████████ ████ ███████████ █████████████████████ ██████████ █ ██ ███ ███████████████████
█████ ██████████████████████ ███████████████████████ ████████████████ ██████ ███████ ████ ██
██████
███████
██ ████ ██
██
pagination_numbered_component.rb
█ ██████████████████████ ████
█████ ███████████████████████████ █ ███████████████████
███ █████████████████████████ █████████████ █████████ ████ ████████████ ████ ████████████ ██
█████████████ █ █████████████████
████████████ █ ████████████████
█████████ █ ████████
████████████ █ ███████████
████████████ █ ████████████████
███
pagination_controller.js
██████ █ ██████████ █ ████ ████████████████████
██ ████████ ██ ████████████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ ██████████ ██████████ █████████████
██████ ██████ █ █ ████████ ████████ █████████ ███████ █
█████████ █
██ ███████████████████ ██ █████████████████████ █
█████████████ █ ███ █████████████████████
Simple
Prev/Next buttons only with page X of Y text. Clean and minimal.
_pagination.html.erb
███
██████████ █████████ █ ██████ █████ █████████
██████
███ ██████ ███████████████████████████████
█████████████ ██
████████████ ███
█████████ ████████████████
█████████ ███████████████ ██
pagination_controller.js
██████ █ ██████████ █ ████ ████████████████████
██ ████████ ██ ████████████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ ██████████ ██████████ █████████████
██████ ██████ █ █ ████████ ████████ █████████ ███████ █
█████████ █
██ ███████████████████ ██ █████████████████████ █
█████████████ █ ███ █████████████████████
pagination_simple_component.html.erb
████ ███████████████████████ ███████████ ████████████ █████████████████
███ ████████ ██████ ██
██ ██ ██████████████ ██
█████ ██████████ ███████████████████████████ ███ █████████████████████
████ ██████████ ████ ███████████ █████████████████████ ██████████ █ ██ ███ ███████████████████
█████ ██████████████████████ ███████████████████████ ████████████████ ██████ ███████ ████ ██
██████
████████
███████
██ ████ ██
pagination_simple_component.rb
█ ██████████████████████ ████
█████ █████████████████████████ █ ███████████████████
███ █████████████████████████ █████████████ █████████ ████ █████████ ████ ████████████ ████
█████████████ █ █████████████████
████████████ █ ████████████████
█████████ █ ████████
█████████ █ ████████
████████████ █ ███████████
███
pagination_controller.js
██████ █ ██████████ █ ████ ████████████████████
██ ████████ ██ ████████████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ ██████████ ██████████ █████████████
██████ ██████ █ █ ████████ ████████ █████████ ███████ █
█████████ █
██ ███████████████████ ██ █████████████████████ █
█████████████ █ ███ █████████████████████
Cursor
Load More button with optional auto-load. No page numbers.
_pagination.html.erb
███
██████████ █████████ █ ██████ █████ █████████
██████
███ ██████ ███████████████████████████████
█████████ ███████████████████████
███████████████ █████ ████ ███████
██████████ █████ ██
████████
pagination_controller.js
██████ █ ██████████ █ ████ ████████████████████
██ ████████ ██ ████████████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ ██████████ ██████████ █████████████
██████ ██████ █ █ ████████ ████████ █████████ ███████ █
█████████ █
██ ███████████████████ ██ █████████████████████ █
█████████████ █ ███ █████████████████████
pagination_cursor_component.rb
█ ██████████████████████ ████
█████ █████████████████████████ █ ███████████████████
███ ████████████████████ ████ █████████████ █████████████ ███████████████ █████ ██████ ████████████ ████ ██████████ ██████
█████████ █ ████████
█████████████ █ ████████████
███████████████ █ ██████████████
████████████ █ ███████████
██████████ █ █████████
███
pagination_cursor_component.html.erb
████
████████████████████████████
██ ██ ██████████ ██████████████████████████████████████████ ███ ██
█
██ ██ █████████ ██
██
█████████ ████████ ███
██████████ ████████████████████████ ███
███████████████████████████████
████████████████████████████████████
pagination_controller.js
██████ █ ██████████ █ ████ ████████████████████
██ ████████ ██ ████████████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ ██████████ ██████████ █████████████
██████ ██████ █ █ ████████ ████████ █████████ ███████ █
█████████ █
██ ███████████████████ ██ █████████████████████ █
█████████████ █ ███ █████████████████████
Changelog
- v1.0.0: Initial release with numbered, simple, and cursor styles
Get Full Access
Unlock the source code for this component and all others. One-time payment for lifetime access.
Get Access Now