# Custom frontend pagination with Supabase

**URL:** <https://community.weweb.io/t/custom-frontend-pagination-with-supabase/6973>\
**Category:** How do I?\
**Tags:** supabase\
**Created:** [February 12, 2024, 7:32pm UTC](https://community.weweb.io/t/custom-frontend-pagination-with-supabase/6973 "2024-02-12T19:32:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gduteaud](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gduteaud](https://community.weweb.io/u/gduteaud)\
**Post date:** [February 12, 2024, 7:32pm UTC](https://community.weweb.io/t/custom-frontend-pagination-with-supabase/6973/1 "2024-02-12T19:32:33Z")

</div>

Hi all!

I have a use case where backend pagination is not necessary or desirable (the collection will have at most a few hundred items and I would rather load them all upfront and let the users navigate thepagination faster). I want to provide users the option to select the number of items displayed per page, using a dropdown selector.

Everything I could find about custom pagination had to do with backend pagination. How would I achieve this in the frontend?

Thanks!

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [February 13, 2024, 1:13am UTC](https://community.weweb.io/t/custom-frontend-pagination-with-supabase/6973/2 "2024-02-13T01:13:47Z")

</div>

You can use the slice method say they want to view 10 do slice(array, 10_page, 10_page +10) where page is a variable of what pagination there on each time they click next +1 previous -1.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/e/e0002b539a27ff1e3ce429e66b1201f3d5253100.png)

Hope this helps.

---

<div class="post-metadata">

**Author:** ![gduteaud](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gduteaud](https://community.weweb.io/u/gduteaud)\
**Post date:** [February 13, 2024, 2:33am UTC](https://community.weweb.io/t/custom-frontend-pagination-with-supabase/6973/3 "2024-02-13T02:33:36Z")

</div>

Thank you, I understand this but I feel like there was a simpler way with the built-in paginator?

---

<div class="post-metadata">

**Author:** ![gduteaud](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gduteaud](https://community.weweb.io/u/gduteaud)\
**Post date:** [February 16, 2024, 12:30am UTC](https://community.weweb.io/t/custom-frontend-pagination-with-supabase/6973/4 "2024-02-16T00:30:19Z")

</div>

I did manage this with the slice approach by the way, but I really feel I was previously able to achieve the same thing much more easily with a more “off-the-shelf” approach. Or maybe I’m misremembering, idk!
