Pagination

Table (gem footer pager) Cards (kaminari default pager)
How this page is built the gem renders it — this is all you write

Pagination works in a custom layout too. You still paginate in the controller (kaminari); the cards layout feeds collection.page_scope to kaminari's own paginate helper, so the pager below is kaminari's default markup — styling it is your job, as always with kaminari.

app/controllers/books_controller.rb
@query = CrudComponents::Query.new(Book, params, fieldset: :index, ability: current_ability)
@books = @query.apply(Book.all).page(params[:page]).per(8)   # kaminari
app/views/crud_components/layouts/_cards.html.erb
<%= paginate collection.page_scope %>   <%# kaminari's own pager, inside your card layout %>
app/views/pagination/index.html.erb
<%= crud_collection @books, query: @query, layout: :cards %>

Read more: Pagination  ·  Add a layout

Reset
The Broken Empire 43
Author names
Ursula Le Guin
Genre
Fiction
Price
20.31 €
Publisher
Del Rey
Active
The Endless Station 47
Author names
Joe Abercrombie and Kim Robinson
Genre
Fiction
Price
26.37 €
Publisher
Tor Books
Active
The Ancient City 52
Author names
Margaret Atwood
Genre
Fiction
Price
17.77 €
Publisher
Gollancz
Active
The Broken Machine 61
Author names
Ann Leckie
Genre
Fiction
Price
30.16 €
Publisher
Orbit
Active
The Broken Dune 63
Author names
Liu Cixin and Mary Shelley
Genre
Fiction
Price
6.27 €
Publisher
Baen
Active
The Luminous Ocean 64
Author names
Becky Chambers and Stanisław Lem
Genre
Fiction
Price
33.85 €
Publisher
Baen
Active
The Dispossessed Ocean 67
Author names
Martha Wells
Genre
Fiction
Price
40.62 €
Publisher
Tor Books
Active
The Ancient City 72
Author names
Stanisław Lem, Mary Shelley, and Frank Herbert
Genre
Fiction
Price
34.41 €
Publisher
Orbit
Active