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 Mirror 96
Author names
Stanisław Lem
Genre
Fiction
Price
34.38 €
Publisher
Vintage
Active
The Luminous Empire 97
Author names
Liu Cixin
Genre
Fiction
Price
13.61 €
Publisher
Baen
Active
The Ancient Engine 101
Author names
Adrian Tchaikovsky
Genre
Fiction
Price
37.89 €
Publisher
Vintage
Active
The Dispossessed Dune 102
Author names
Frank Herbert, Joe Abercrombie, and Mary Shelley
Genre
Fiction
Price
37.91 €
Publisher
Active
The Distant Dune 104
Author names
Becky Chambers and Iain Banks
Genre
Fiction
Price
25.09 €
Publisher
Ace
Active
The Distant Station 106
Author names
Frank Herbert and Mary Shelley
Genre
Fiction
Price
12.86 €
Publisher
Orbit
Active
The Broken Winter 108
Author names
Ted Chiang
Genre
Fiction
Price
32.73 €
Publisher
Vintage
Active
The Hidden Dune 110
Author names
Iain Banks, Joe Abercrombie, and Frank Herbert
Genre
Fiction
Price
40.26 €
Publisher
Orbit
Active