React Nested Dropdown for Material UI (MUI) - Robin Wieruch

React Nested Dropdown for Material UI (MUI) - Robin Wieruch

Material UI for React, also called MUI, does not come with a native nested Dropdown menu. Here I want to share the nested dropdown component that I have used for several of my freelance projects when using Material UI. Before you can use it, you have to check out my implementation for a dropdown with Material UI (MUI) in React:

In the Dropdown component that we already have from the previous tutorial, we include a new nested dropdown menu and style it the same way as the native dropdown menu:

Then in a new file, we create the new nested dropdown menu item which we imported in the previous step for the dropdown component:

Last, use the new nested dropdown component which allows you to specify a nested menu:

That’s it. The dropdown component in Material UI (MUI) should have a nested menu.

Recommended articles