Skip to content

[FR] Ability to use current active style as selected in first class way for MenuItem #7100

Open
@evansjohnson

Description

Feature request

The current "selected" styling adds a checkmark icon which takes up space. This can be seen as undesirable in menus that already add icons to menu items.

Allowing this to be configured in a first class way would mean we could still lean on BP for the aria-selected attribute that gets added.

This would be a breaking change to outright change, but it would be nice to have a way to opt into an alternate menu item styling where selected is styled the way active currently is, and active would style with something that resembles a focus outline.

I suspect there are many uses of MenuItem that ignore the docs guidance, and abuse the active prop for selected styling.

Examples

desired behavior:
Screenshot 2024-11-25 at 3 02 50 PM

current behavior:
Screenshot 2024-11-25 at 3 02 45 PM

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions