Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Paginated List Reviews Block for React

Twenty-four reviews of a cookbook five to a page, with a page-size Select, the catalog pagination with ellipsis and a polite 'Showing 6 to 10 of 24'.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A paginated list of reviews for React with Base UI, for Ember & Rye, a fictional cookbook of wood-fired breads. A centred header gives the count and the average (worked out from the twenty-four typed reviews), then a thin toolbar band holds the page's own heading, "Reviews 6 to 10", and a Select for 3, 5 or 10 reviews per page. Ruled rows run from rail to rail, each with the reviewer, the stars with their value in words, the title and the text. A closing band ends the block with a polite "Showing 6 to 10 of 24" and the catalog Pagination with ellipsis. Choosing a page moves focus to the heading, and every page is drawn once more, unseen, so the pager never moves. It's built from Pagination, Select, Rating, Avatar and Guides.

FAQ

How do I change the page sizes?

Edit SIZES (the labels and values the Select shows) and the first useState(5) for the default. Changing the size returns to page 1. The number of pages, the "Showing" line and the heading are all computed from REVIEWS and the size, so adding a review needs no other edit.

How does the pager handle many pages?

Up to seven pages it draws every number. Past that it draws seven slots, the first, the last and a window around the current page with an ellipsis on each side it skips, so the pager keeps its width as you move through it. Previous and Next dim and leave the tab order at the ends.

Where does focus go when the page changes?

To the "Reviews 6 to 10" heading above the list, so a keyboard or screen reader user lands just before the new reviews. The status line also announces the new range. Page numbers are real links to ?page=n; the click swaps the rows in place.

Why doesn't the pager move between pages?

Every page of the current size is drawn again, unseen, in the same grid cell as the live page, so the cell keeps the height of the tallest page. Changing the page size changes that height on purpose, since you asked for more or fewer rows.

How does it fit on a phone?

Each review stacks its reviewer above its text, the toolbar puts the Select under the heading at full width and the pager sits under the status line. Pick 3 per page for the shortest scroll.

  • Pro

    Twenty reviews of a podcast app ten at a time in a fixed-height scroll region that appends five more at its end, with a Load more button, placeholder rows and a polite count.

  • Pro

    Compact List Reviews

    Lists and pages

    Twelve one-line reviews of a notes app as a real table with sortable column heads, a Select that mirrors the sort, and nothing to open.

  • Pro

    Eighteen reviews of a sewing machine sorted into four tabs, Most recent, Most helpful, Critical and Verified, each with its derived count and three reviews.

  • Pro

    Advanced Sort Reviews

    Filter and search

    A filter panel for tent reviews: a sort key, an order, star pills, a recency segment and a verified Switch beside the matching reviews, with removable chips, a live count and a bottom Sheet on phones.

  • Pro

    A review summary for a carry-on suitcase whose star rows filter the reviews: the average, the count, the share that would recommend it and a five-row distribution, beside the four most helpful reviews with a Helpful vote each.

  • Pro

    Pagination Blog

    Post lists

    A transit-planning blog's archive as rows, four to a page over three pages, with the catalog pagination in a band at the foot, a polite 'Showing 5 to 8 of 12' line and a height that never changes between pages.