search

Home  >  Q&A  >  body text

How to add menu items to Material UI cards

<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粉662802882P粉662802882441 days ago394

reply all(1)I'll reply

  • P粉470645222

    P粉4706452222023-08-31 00:07:22

    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.

    reply
    0
  • Cancelreply