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 Silent City 75
Author names
Iain Banks and Octavia Butler
Genre
Fiction
Price
44.32 €
Publisher
Orbit
Active
The Silent Tower 78
Author names
Adrian Tchaikovsky
Genre
Fiction
Price
16.99 €
Publisher
Vintage
Active
The Endless Ocean 79
Author names
Liu Cixin
Genre
Fiction
Price
24.96 €
Publisher
Active
The Hidden Winter 82
Author names
Joe Abercrombie, Ann Leckie, and Mary Shelley
Genre
Fiction
Price
12.30 €
Publisher
Vintage
Active
The Hidden Signal 85
Author names
Becky Chambers, Liu Cixin, and Margaret Atwood
Genre
Fiction
Price
20.30 €
Publisher
Ace
Active
The Burning Station 87
Author names
Adrian Tchaikovsky and Joe Abercrombie
Genre
Fiction
Price
15.13 €
Publisher
DAW
Active
The Ancient Signal 88
Author names
Becky Chambers and Frank Herbert
Genre
Fiction
Price
19.15 €
Publisher
Baen
Active
The Hidden Door 95
Author names
Mary Shelley
Genre
Fiction
Price
21.22 €
Publisher
Baen
Active