How to add menu items to Material UI cards
P粉662802882
P粉662802882 2023-08-30 10:24:08
0
1
449
<p>I have the following example:</p> <p>https://codesandbox.io/s/material-ui-card-styling-example-lcup6?fontsize=14</p> <p>I just wanted to add some menus, such as edit, delete, to the three-dot menu link, but with no success. Tried adding menu items etc. to the <code>IconButton</code> and <code>MoreVertIcon</code> sections but nothing changed. </p> <p>So, what should I do? </p>
P粉662802882
P粉662802882

reply all(1)
P粉470645222

In the example you provided, the menu link does not have any onClick action. It sounds like you need a Menu element to appear when the menu button is clicked. Please see Menu component in the MUI documentation.

As an example, I forked your example and added a menu.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template