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 Distant Station 28
Author names
Liu Cixin
Genre
Scifi
Price
15.62 €
Publisher
Del Rey
Active
The Silent Door 29
Author names
Iain Banks
Genre
Nonfiction
Price
38.24 €
Publisher
DAW
Active
The Endless Tower 30
Author names
Liu Cixin, Ted Chiang, and Becky Chambers
Genre
Nonfiction
Price
38.98 €
Publisher
Baen
Active
The Quiet Machine 31
Author names
Margaret Atwood
Genre
Fiction
Price
21.83 €
Publisher
Tor Books
Active
The Ancient Engine 32
Author names
Octavia Butler
Genre
Fiction
Price
33.11 €
Publisher
Tor Books
Active
The Endless Mirror 33
Author names
Frank Herbert
Genre
Scifi
Price
39.79 €
Publisher
DAW
Active
The Ancient Door 34
Author names
Margaret Atwood and Mary Shelley
Genre
Fiction
Price
32.79 €
Publisher
Ace
Active
The Hidden Mirror 35
Author names
Ann Leckie
Genre
Fiction
Price
27.24 €
Publisher
Ace
Active