DyteMenu
A menu component.
LIVE EDITOR
<Row style={{ padding: '52px 0 0 0' }}> <DyteMenu placement="top"> <DyteButton slot="trigger">Top Menu</DyteButton> <DyteMenuList> <DyteMenuItem onClick={() => alert('You clicked: alert()')}> alert() </DyteMenuItem> </DyteMenuList> </DyteMenu> {/* This menu will be placed at top due to less space */} <DyteMenu placement="bottom"> <DyteButton slot="trigger">Bottom Menu</DyteButton> <DyteMenuList> <DyteMenuItem onClick={() => alert('You clicked: alert()')}> alert() </DyteMenuItem> </DyteMenuList> </DyteMenu> </Row>
Preview
Props
iconPack
offset
Offset in px
Default
10
Type
number
placement
Placement of menu
Default
'bottom-end'
Type
"bottom" | "bottom-end" | "bottom-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start"
size
Size
Type
"lg" | "md" | "sm" | "xl"