Components
Pagination

Pagination

The Pagination component provides you with page navigation and pagination.

Import

import { Pagination } from '@nostromo/ui-core'
// or
import { Pagination } from '@nostromo/ui-core/pagination'

Usage

import { Pagination } from '@nostromo/ui-core'
 
export default function Example() {
  const [currentPage, setCurrentPage] = React.useState(1)
  
  return (
    <Pagination
      currentPage={currentPage}
      totalPages={10}
      onPageChange={setCurrentPage}
    />
  )
}

Live Examples

Live Example
☀️
Copy
Storybook →
View Code
import { Pagination } from '@nostromo/ui-core' export default function PaginationExample() { const [currentPage, setCurrentPage] = React.useState(1) return ( <Pagination currentPage={currentPage} totalPages={10} onPageChange={setCurrentPage}...

Props

PropTypeDefaultRequiredDescription
currentPagenumber-YesCurrent active page (1-indexed)
totalPagesnumber-YesTotal number of pages
onPageChange(page: number) => void-YesCallback when page changes
showFirstLastbooleantrueNoWhether to show first/last page buttons
showPrevNextbooleantrueNoWhether to show previous/next buttons
maxVisiblePagesnumber5NoMaximum number of visible page buttons
disabledbooleanfalseNoWhether pagination is disabled
variant"default" | "outline" | "ghost""default"NoVisual variant
size"sm" | "default" | "lg""default"NoSize of pagination buttons
classNamestringundefinedNoAdditional CSS classes

Standard HTML Props

The Pagination component extends React.HTMLAttributes<HTMLElement>, so it accepts all standard HTML attributes (e.g., id, data-*, aria-*).