logo

Lumina Design

ComponentsIcons
Installation
AccordionAppHeaderAutoCompleteAvatarBottomNavigationBreadcrumbButtonCarouselCheckboxChipColumnDataTableDatePickerDialogFloatingButtonFloatingMenuInputFieldLinkMenuDropdownNextToastProviderProgressRadioButtonRangeSliderResizablePanelSelectDropDownSideBarTabSelectTabsTagTextTextAreaThemeProviderToastProviderToggleInputToggleSwitchTooltip

MenuDropdown

The MenuDropdown component is a UI element that reveals a list of options or actions when triggered, typically by clicking or hovering. Dropdown menus are crucial for keeping interfaces clean and uncluttered by hiding less frequently used options until needed. They are commonly used in navigation bars, settings menus, or selection fields in forms. For example, in an e-commerce site, a MenuDropdown could be used to display different categories or account settings.

MenuItem

The MenuItem component represents a single selectable option within a Menu or MenuDropdown. It can include text, icons, or even nested submenus, making it a flexible building block for creating complex navigational structures. MenuItems are used in scenarios where users need to choose from a list of actions or navigate to different sections of an application. For instance, in a file management system, MenuItems might include options like 'Open', 'Rename', or 'Delete'.

Menu Alignment (Attribute: `alignMenu`)

Code

import { MenuDropdown, MenuItem } from "@lumina-design/core/MenuDropdown";
    
<MenuDropdown
  label={
    <span>
      <LuminaIcon.List width={20} height={20} name="list" /> Simple
      Menu
    </span>
  }
  alignMenu="right"
>
  <MenuItem onClick={() => console.log("HELLO WORLD")}>
    Home
  </MenuItem>
  <MenuItem>Settings</MenuItem>
  <MenuItem>Logout</MenuItem>
</MenuDropdown>