Materialish

Menu

Menus represent a list of items. They can be used within selects or dropdowns.

🙌 Heads up! This code is editable. The preview above will update to reflect your changes.

Usage

import { Menu } from 'materialish';
import 'materialish/materialish.css';

Menu

Props

Prop NameDefault ValueDescription
classNameAdditional class name(s) to add to the menu
nodeRefPass a ref to get access to the root node
...restOther props are placed on the underlying ul element of the menu

CSS Variables

VariableDefault ValueDescription
--mt-baseFontSize1remThe size of text within the menu
--mt-fontFamily'Roboto'The font family to use for text
--mt-menuItemMinHeightThe minimum allowed height for menu items

Menu.Item

Props

Prop NameDefault ValueDescription
classNameAdditional class name(s) to add to the menu item
separatorfalsePass true to include a border-bottom to the menu item
selectedfalseWhether or not this menu item is currently selected
rippletrueWhether or not to display the "ripple" effect when the menu item is clicked
childrenThe contents to render within the menu item
nodeRefPass a ref to get access to the root node
...restOther props are placed on the root element of the menu item

Menu.Separator

Props

Prop NameDefault ValueDescription
classNameAdditional class name(s) to add to the menu separator
nodeRefPass a ref to get access to the root node
...restOther props are placed on the root element of the menu separator

Useful Links