121 Pro components and page blocks

Get Pro

Updated

Pagination

New

Preview

Customize

Total24
Siblings1
Boundaries1
Medium
Duration0.35s

Installation

npx shadcn@latest add https://uibrik.com/r/pagination.json
Adds the files to components/uibrik/pagination and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/pagination.

Usage

import { Pagination } from "@/components/uibrik/pagination/pagination";​<Pagination  total={24}  siblings={1}  boundaries={1}  jump  size="md"  duration={0.35}  defaultPage={6}  label="Pagination"  // page={0}  // onPageChange={(page) => {}}/>

Where to use Pagination

  • Tables and search results

    Pagination that never changes width keeps buttons under the pointer as pages change.

    Pairs with Data Table

  • Blog and product listings

    Numbers rolling like an odometer when the window shifts make long ranges clear.

  • Large admin lists

    An ellipsis opening into a jump-to-page field reaches page 40 without clicking 40 times.

Props

Pagination
total
Type number
24
Number of pages.
siblings
Type number
1
Pages shown either side of the current one.
boundaries
Type number
1
Pages always shown at each end.
jump
Type boolean
true
An ellipsis opens a field to type a page into.
size
Type "sm" | "md" | "lg"
"md"
Height and text size.
duration
Type number
0.35
How long the pill and the numbers take to move.
page / onPageChange
Type number / (page) => void
–
Controlled current page, from 1.
defaultPage
Type number
1
Page on mount when uncontrolled.
label
Type string
"Pagination"
Names the navigation for screen readers.
className
Type string
–
Classes for the nav. It fills its container and switches to a compact "3 / 20" below 352px.