Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should I use Lists vs Menus in Material-UI?

I'm having trouble figuring out the difference between Lists and Menus in Material-UI.

Docs

Lists - https://material-ui-next.com/demos/lists/

Menus - https://material-ui-next.com/demos/menus/

Description

My thinking is that Menus are used for routing and navigation while Lists are used for configuration or static content, but then I saw these quotes:

Menus appear upon interaction with a button, action, or other control. They display a list of choices, with one choice per line.

Reading this, Menus aren't intended to always show, they're designed to be hidden and only shown temporarily.

Menus should not be used as a primary method for navigation within an app.

This makes it seem like a sidebar with a list of navigation elements should be a List. If so, what if I take the same component and want to also use it in a dropdown menu? Do I have to make a separate component using Menu components?

Question

Since the docs are unclear to me, what instances would I want to use Menus vs Lists?

like image 675
Kevin Ghadyani Avatar asked Mar 14 '18 16:03

Kevin Ghadyani


People also ask

Is material UI good for performance?

Material UI provides developers with material-based UI components. They help save some time on design and app development. But since Material UI is mostly a set of UI components, it doesn't offer such a great boost to the development speed as Bootstrap does.

Is material UI widely used?

MUI Core. MUI Core, formerly known as Material-UI, is the most popular React component library on GitHub after Ant Design.

What is a menu in UI?

Menus display lists of related options (which can be grouped together) as well as unrelated options. Menus appear when a user taps an interactive UI element such as an icon, button, action, or content, such as selected items or text.


1 Answers

These components follow the Material Design standards, so their intended use would follow the standards.

For Menu:

Menus display a list of choices on a transient sheet of material.

For List:

Lists present multiple line items vertically as a single continuous element.

So while they're similar, I think the key difference is that Menu is intended for a transient selection, presented within something like a Dialog or Modal.

like image 152
Ken Gregory Avatar answered Nov 03 '22 15:11

Ken Gregory