Blossom UI

Pagination

Pagination component with ellipses for long lists, rounded and simple variants, controlled by a page state.

How to use it

Run npx @blossomui/react add pagination, or copy src/components/UI/Pagination/Pagination.tsx into your React project and import it.

import { getPages, Pagination, SimplePagination } from './components/ui/Pagination'

Props

PaginationLabels

PropTypeDescription
navigation (required)string
previous (required)string
next (required)string
previousPage (required)string
nextPage (required)string
page (required)(page: number) => stringAccessible name of the button of a page.
pageWord (required)stringWord before the current page in the simple version.
of (required)stringWord between the current page and the total in the simple version.

PaginationProps

PropTypeDescription
labelsPartial<PaginationLabels>Texts of the component. Pass only the ones you want to change, for example to translate it.
colorstringAccent color of this component: any CSS color. Without it the component uses `--blossom-accent`, which is pink by default.
page (required)numberCurrent page, starting at 1.
total (required)numberTotal number of pages.
onChange (required)(page: number) => void
siblingsnumberPages shown on each side of the current one.
roundedboolean

SimplePaginationProps

PropTypeDescription
labelsPartial<PaginationLabels>Texts of the component. Pass only the ones you want to change, for example to translate it.
colorstringAccent color of this component: any CSS color. Without it the component uses `--blossom-accent`, which is pink by default.
page (required)number
total (required)number
onChange (required)(page: number) => void

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree