Skip to content

[feat]: Create <pf-v6-overflow-menu> element #3027

@bennypowers

Description

@bennypowers

Summary

Create `` to implement the PatternFly v6 Overflow menu component.

Responsive action bar that collapses items into a dropdown menu when space is constrained.

Prior Art

Source Element Status
PFE v4 -- --
cem -- --
cockpit -- --
chickadee -- --

Requirements

  • MUST implement PFv6 visual designs
  • MUST provide end-user feature parity with `@patternfly/react-core` OverflowMenu
  • 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 `breakpoint`: `sm`, `md`, `lg`, `xl`, `2xl` - below this breakpoint, items collapse into dropdown
  • React `breakpointReference`: `window` or a CSS selector for container-relative breakpoint
  • React sub-components: `OverflowMenuContent`, `OverflowMenuControl`, `OverflowMenuDropdownItem`, `OverflowMenuGroup`, `OverflowMenuItem`
  • `OverflowMenuContent` - visible items; `OverflowMenuControl` - the "..." dropdown trigger
  • Uses `` + `` for the overflow dropdown
  • Use `ResizeObserver` or container queries to determine breakpoint; SSR-safe with `isServer` guard
  • Overflow items must duplicate the label from visible items for accessible dropdown

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 v4for devpriority: mediumSeverity level: 2

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions