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 Hidden Forest 1
Author names
Frank Herbert, Ted Chiang, and Ann Leckie
Genre
Nonfiction
Price
28.24 €
Publisher
Orbit
Active
✗
The Ancient Winter 3
Author names
Joe Abercrombie
Genre
Fiction
Price
24.81 €
Publisher
DAW
Active
✗
The Quiet Forest 8
Author names
Becky Chambers
Genre
Fiction
Price
11.98 €
Publisher
Ace
Active
✗
The Broken Engine 9
Author names
Ted Chiang, Ann Leckie, and Frank Herbert
Genre
Fiction
Price
32.99 €
Publisher
Gollancz
Active
✗
The Endless Station 13
Author names
Ann Leckie, Martha Wells, and Ursula Le Guin
Genre
Fiction
Price
27.05 €
Publisher
DAW
Active
✗
The Hidden Mirror 14
Author names
Ursula Le Guin and Kim Robinson
Genre
Nonfiction
Price
22.58 €
Publisher
Ace
Active
✗
The Ancient Signal 16
Author names
Joe Abercrombie
Genre
Scifi
Price
35.51 €
Publisher
Del Rey
Active
✗
The Quiet Door 18
Author names
Becky Chambers
Genre
Scifi
Price
21.79 €
Publisher
Gollancz
Active
✗