Grails's paginator is integrated with the query builder and Eloquent ORM and provides convenient, easy-to-use pagination of database results out of the box. The HTML generated by the paginator is compatible with the Bootstrap CSS framework.
In this example, for pagination, we need to set limit in the controller. we will paginate the Contact model with 5 items per page. So we can set this as like
$contacts = Contact::paginate(5);
For Displaying Pagination Results in the view, just write {{ $users->links() }} which will render using blade and the HTML generated by the links method is compatible with the Bootstrap CSS framework.
There are several ways to paginate items. For more - https://grails.com/docs/5.4/pagination