carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.82k stars 1.81k forks source link

[Feature Request]: Support the ability to make the MenuItem component a clickable link #17788

Open AbrahamLara opened 2 hours ago

AbrahamLara commented 2 hours ago

The problem

I am implementing a feature for a chat bot that allows developers to add custom elements to the chat header. The custom elements are a link, menu (w/submenus), and buttons.

Even if the web chat is a larger size, there is only so much you can fit into the chat header. This is where the Menu component is useful for a developer who wants to fit more elements in the chat header that can't all be displayed at once.

The problem at the moment is that developers will be able to add Menus with custom buttons and submenus that can't fit in the header, but they won't be able to add links to menus because the MenuItem component doesn't support anchor element attributes as props (href, target, etc.).

Image

The solution

I would like for the MenuItem component to support anchor element attributes so that it can be a link in order to help complete the feature I'm working on.

Examples

Application/PAL

No response

Business priority

Medium Priority = upcoming release but is not pressing

Available extra resources

No response

Code of Conduct

github-actions[bot] commented 2 hours ago

Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.

If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.