0

I am trying to use the @material-ui/core library in my application and want to create a nested menu. I can see that material.io specification talks about a nested menu but material-ui does not have a built in support for the same. I tried using Menu and MenuItems. Also went through the documentation, but did not find the way to create such nested menu. Basically MenuItem is not allowing me to add children inside it. Can someone help me understand how to do this?

a nested menue taken as a reference from the material.io specification

sandbox: https://codesandbox.io/s/material-ui-nested-menu-problem-ibxoh

2
  • Please can (or in the future, remember to) add some of your code of what you tried to the body of the question, not just linking off to it. It makes it much easier for people to see what you've already tried. Thanks! Commented Oct 12, 2023 at 10:44
  • You may watch a demo in jcoreio.github.io/material-ui-popup-state/… , then may check out my answer stackoverflow.com/a/79433297/9549068 Commented Feb 12 at 13:51

2 Answers 2

1

This functionality is not supported by material-ui officially yet. However, there is a package about it called material-ui-nested-menu-item, you can check how it works here:

https://codesandbox.io/s/material-ui-nested-menu-item-example-b25j6

Sign up to request clarification or add additional context in comments.

1 Comment

Could you provide some code examples in the body of your answer?
0

Here is a package for MUI version 5.

Material UI Nested Menu Item v5 on NPM

Material UI Nested Menu Item v5 Demo

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.