Skip to content

    Browse components

    Pagination

    Page controls with fixed-width ellipsis logic, a spring-sliding active pill, and ellipses that turn into skip buttons on hover.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/pagination

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/pagination.json

    Usage

    import { Pagination } from "@/components/ui/pagination";
    
    <Pagination total={20} page={page} onPageChange={setPage} />

    Props

    PropTypeDefaultDescription
    totalnumber20Number of pages.
    siblingsnumber1Pages shown on each side of the current page.
    boundariesnumber1Pages always shown at each end.
    showControlsbooleantruePrevious / Next buttons.
    pageReactNode—Controlled 1-based page (with onPageChange), or use defaultPage.
    onPageChangeReactNode—Called with the new page.
    classNamestring—Extra classes for the root element.