Skip to content

[feat]: Create <pf-v6-pagination> element #2938

@zeroedin

Description

@zeroedin

Summary

Create `` to implement the PatternFly v6 Pagination component.

Page navigation controls for data views, with page/per-page controls and optional compact mode.

Prior Art

Source Element Status
PFE v4 -- --
cem -- --
cockpit -- --
chickadee -- --
Red Hat `` Exists

Requirements

  • MUST implement PFv6 visual designs
  • MUST provide end-user feature parity with `@patternfly/react-core` Pagination
  • MAY adjust element API to leverage web platform strengths
  • SHOULD maintain CSS custom property theming compatibility
  • SHOULD expose useful CSS shadow parts

Element-specific considerations

  • React `itemCount`, `page`, `perPage` - controlled props; map to `item-count`, `page`, `per-page` attributes
  • React `onSetPage`, `onPerPageSelect`, `onFirstClick`, `onLastClick`, `onNextClick`, `onPreviousClick` - emit corresponding events (`page-change`, `per-page-change`, etc.)
  • React `variant`: `top`, `bottom`, `left` - affects button arrangement; map to `variant` attribute
  • React `isCompact` - compact layout; map to `compact` attribute
  • React `isSticky` - CSS sticky positioning; map to `sticky` attribute
  • React `isDisabled` - disables all controls
  • React `perPageOptions` - array of `{ title, value }`; map to JSON attribute or `` sub-elements
  • React `PaginationTitles` - i18n strings for button labels; map to `*-label` attributes
  • First/last page buttons disabled at boundaries; prev/next disabled at start/end
  • ARIA: each navigation button needs `aria-label`; page count is a live region if it updates

Checklist

Implementation

  • API per `.claude/ADVICE.md`
  • CSS uses v6 tokens, logical properties, nesting
  • `@summary` and JSDoc on element class

Demos

  • Demos match patternfly.org naming/structure
  • CSS custom properties match computed styles from patternfly.org (Chrome MCP)
  • Visual parity verified via Chrome MCP

Tests

  • Public API covered (attributes, properties, events, slots)
  • `a11ySnapshot` assertions

Reviews

  • `/review-api` passes
  • `/review-demos` passes
  • `/review-a11y` passes
  • `eslint` and `stylelint` pass

Ship

  • Add changeset
  • PR targets `staging/pfv6` (NOT `main`)

Metadata

Metadata

Assignees

No one assigned

    Labels

    1:1Aligning components with PatternFly v4good 1st issueGood for newcomers to the project; requires at least an introductory knowledge of the languagepriority: highSeverity level: 1

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions