Pagination

Pagination with page navigation, next and previous links.

Anatomy

Pagination do |p|
p.previous
p.link
p.ellipsis
p.next
end

API Reference

Pagination

The root navigation container for pagination controls. Provides proper ARIA roles and semantic structure for page navigation.

NameType
attributeskeyword arguments

Pagination#item

NameType
attributeskeyword arguments

Rails link_to helper that renders a pagination link.

NameTypeDefault
namestringnil
The page number or text content (first argument to link_to). Required unless using a block.
optionshashnil
URL or path options passed to link_to (second argument). Typically contains page parameter.
html_optionshashnil

Pagination#previous

Rails link_to helper that renders a pagination link.

NameTypeDefault
optionshashnil
URL or path options for the previous page link.
html_optionshashnil
HTML attributes for the previous link.

Pagination#next

Rails link_to helper that renders a pagination link.

NameTypeDefault
optionshashnil
URL or path options for the next page link.
html_optionshashnil
HTML attributes for the next link.

Pagination#ellipsis

Visual indicator for skipped pages in pagination. Displays three dots with proper ARIA hidden attribute and screen reader text.

NameType
attributeskeyword arguments

Examples