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 Garden 109
Author names
Ted Chiang
Genre
Fiction
Price
22.95 €
Publisher
Vintage
Active
✓
The Burning Station 110
Author names
Mary Shelley
Genre
Nonfiction
Price
24.38 €
Publisher
Baen
Active
✓
The Distant Archive 111
Author names
Frank Herbert
Genre
Nonfiction
Price
11.59 €
Publisher
DAW
Active
✓
The Dispossessed Signal 112
Author names
Ted Chiang and Frank Herbert
Genre
Scifi
Price
38.73 €
Publisher
Gollancz
Active
✓
The Quiet Forest 113
Author names
Adrian Tchaikovsky and Octavia Butler
Genre
Fiction
Price
33.56 €
Publisher
Vintage
Active
✓
The Ancient Archive 114
Author names
Frank Herbert, Kim Robinson, and Margaret Atwood
Genre
Nonfiction
Price
44.21 €
Publisher
Ace
Active
✓
The Silent Archive 116
Author names
Ted Chiang and Joe Abercrombie
Genre
Fiction
Price
10.28 €
Publisher
—
Active
✓
The Endless Empire 117
Author names
Becky Chambers and Ted Chiang
Genre
Scifi
Price
29.30 €
Publisher
—
Active
✓