Skip to content
Components

Pager

Previous and next links between pages in a sequence.

After the one-time setup, call the helper directly from ERB. No component import is needed.

<%= lc_pager previous: [ "Installation", "/components/pager.html" ], next: [ "Theming", "/components/pager.html" ], class: "w-full" %>
<%= lc_pager previous: [ "Installation", "/components/pager.html" ], next: [ "Theming", "/components/pager.html" ], class: "w-full" %>
<%= lc_pager previous: [ "Button", "/components/pager.html" ], next: [ "Card", "/components/pager.html" ], label: "Components", compact: true %>

Helpers render semantic HTML and include their interaction wiring. Pass native attributes through class:, data:, aria: and the usual Rails options. Blocks use captured ERB content.

lc_pager

lc_pager(previous: nil, next: nil, label: lc_t("lostcoords.ui.pager.label"), compact: false, **attributes)
InputDefaultValues
previousnil—
nextnil—
labellc_t("lostcoords.ui.pager.label")Accessible name, visible where applicable
compactfalsetrue · false
attributes{}Native HTML attributes; class:, data: and aria: merge with defaults

Styling and extension

Use class: to merge utilities, native attributes for application behavior, and the theming guide for the shared palette. For custom markup, the advanced class helpers expose the same styles, including glass surfaces and class merging.

API JSON · LLM reference