Pagy
shadcn-style pagination for Pagy, the fastest pagination gem for Rails.
Preview
Installation
First set up Pagy in your application. Then:
rake basecoat:install:pagy
This copies a pagy.scss into your Tailwind directory (or app/assets/stylesheets) and imports it, styling the standard pagy_nav helper output.
Usage
# posts_controller.rb
def index
@pagy, @posts = pagy(Post.all)
end
<%# posts/index.html.erb %>
<%== pagy_nav(@pagy) %>