import { Menu, useNotify } from '@zeal-ui/core';
Editable Code
function MenuDemo() {const { isOpen, onOpen, onClose } = useNotify();return (<><Button onClick={() => onOpen('MENU')}>Menu</Button><Menu isOpen={isOpen === 'MENU'} onClickAway={onClose} width="15rem"><List styleType="circle"><ListItem>There are many variations of passages of Lorem Ipsum available.</ListItem><ListItem>The majority have suffered alteration in some form, by injected humour, orrandomised words.</ListItem><ListItem>Which don't look even slightly believable.</ListItem><ListItem>All the Lorem Ipsum generators on the Internet tend to repeat predefinedchunks as necessary.</ListItem></List></Menu></>);}
width
Description
It is used to set the width of the menu.
Values
String with valid width.
height
Description
It is used to set the height of the menu.
Values
String with valid height.
isOpen
Description
It is used to decide when the menu will be opened and closed.
Values
Boolean value.
onClickAway
Description
It is the function that will be called when user clicks away from the menu.
Values
Function that closes the menu.
top | right | bottom | left
Description
It is used to set the position of the menu.
Values
String with valid position.
color
Description
It is used to set the color of the menu.
Values
primary | secondary | accent | error | warning | success
To learn about customizing the components check this section of the docs.