Patterns

Pagination

Page navigation controls for multi-page data sets; exposes current page and total page count

Markdown version for agents

Import
import { Pagination } from '@amezquita/design-system/components/patterns/Pagination'

Live render

    Props

    PropTypeDescription
    currentPagenumber
    totalPagesnumber
    onPageChange(page: number) => void
    compact?boolean
    className?string
    label?stringAccessible name for the nav landmark — override when a page renders more than one pagination.

    Tokens

    TokenTypeValue
    --pagination-button-backgroundcolortransparent
    --pagination-button-font-sizedimension14px
    --pagination-button-font-weightfontWeight500
    --pagination-button-sizedimension48px

    Usage example

    tsx
    () => {
      const [page, setPage] = useState(5)
      return (
        <div style={{ display: 'flex', flexDirection: 'column', gap: '16px', alignItems: 'flex-start' }}>
          <p style={{ margin: 0, fontSize: '13px', color: 'var(--color-text-secondary)' }}>
            Page {page} of 10
          </p>
          <Pagination currentPage={page} totalPages={10} onPageChange={setPage} />
        </div>
      )
    }