Displays a menu to the user—such as a set of actions or functions—triggered by a button. This component is made on top of Radix UIs Dropdown Menu Component with our styling conventions. This component has been shared with you, ensuring that all its native properties are accessible. If you need to apply your own styling you can use the isBarebone (to remove styling from entire component and its subcomponents) or isUnstyled (to remove styling from a particular subcomponent).
<Menu><MenuTriggerrightIcon={<ChevronDownIconclassName="stroke-2"height={16}width={16}/>}> Actions</MenuTrigger><MenuContent><MenuItem> New Tab</MenuItem><MenuItem> New Window</MenuItem><MenuItemdisabled> New Private Window{' '}</MenuItem></MenuContent></Menu>
Size
There are 3 size options in Menu: sm, md (default) & lg.
<Menusize="sm"><MenuTriggerrightIcon={<ChevronDownIconclassName="stroke-2"height={16}width={16}/>}> Actions</MenuTrigger><MenuContent><MenuItem> New Tab</MenuItem><MenuItem> New Window</MenuItem><MenuItemdisabled> New Private Window{' '}</MenuItem><MenuSeparator/><MenuCheckboxItemchecked> Show Bookmarks{' '}<divclassName="RightSlot"> ⌘+B</div></MenuCheckboxItem><MenuCheckboxItem> Show Full URLs</MenuCheckboxItem><MenuSeparator/><MenuLabel> People</MenuLabel><MenuRadioGroupvalue="1"><MenuRadioItemvalue="1"> Pedro Duarte</MenuRadioItem><MenuRadioItemvalue="2"> Colm Tuite</MenuRadioItem></MenuRadioGroup></MenuContent></Menu>
SubMenu
<Menu><MenuTriggerrightIcon={<ChevronDownIconclassName="stroke-2"height={16}width={16}/>}> Actions</MenuTrigger><MenuContent><MenuSub><MenuSubTriggerstyle={{justifyContent:'space-between'}}> More Tools</MenuSubTrigger><MenuSubContent><MenuItemclassName="justify-between"> Save Page As…{' '}<divclassName="RightSlot"> ⌘+S</div></MenuItem><MenuItem> Create Shortcut…</MenuItem><MenuItem> Name Window…</MenuItem><MenuSeparator/><MenuItem> Developer Tools</MenuItem></MenuSubContent></MenuSub></MenuContent></Menu>
MenuCheckboxItem
<Menu><MenuTriggerrightIcon={<ChevronDownIconclassName="stroke-2"height={16}width={16}/>}> All Feature</MenuTrigger><MenuContent><MenuCheckboxItemchecked> Show Bookmarks{' '}<divclassName="RightSlot"> ⌘+B</div></MenuCheckboxItem><MenuCheckboxItem> Show Full URLs</MenuCheckboxItem></MenuContent></Menu>
MenuRadioGroup
<Menu><MenuTriggerrightIcon={<ChevronDownIconclassName="stroke-2"height={16}width={16}/>}> Actions</MenuTrigger><MenuContent><MenuLabel> People</MenuLabel><MenuRadioGroupvalue="1"><MenuRadioItemvalue="1"> Pedro Duarte</MenuRadioItem><MenuRadioItemvalue="2"> Colm Tuite</MenuRadioItem></MenuRadioGroup></MenuContent></Menu>
Pass isUnstyled prop to remove style from a particular sub component.
<Menu><MenuTriggerrightIcon={<ChevronDownIconclassName="stroke-2"height={16}width={16}/>}size="icon"> Actions</MenuTrigger><MenuContentclassName="dark:bg-secondary-800 rounded-md bg-white p-2"isUnstyled><MenuItem> New Tab</MenuItem><MenuItem> New Window</MenuItem><MenuItemdisabled> New Private Window{' '}</MenuItem></MenuContent></Menu>
IsArrow
The isArrow prop exists in Menu Content subcomponent and is used to show/hide arrow on content. By default, its value is true.
<Menu><MenuTriggerrightIcon={<ChevronDownIconclassName="stroke-2"height={16}width={16}/>}> Actions</MenuTrigger><MenuContentisArrow><MenuItem> New Tab</MenuItem><MenuItem> New Window</MenuItem><MenuItem> New Private Window{' '}</MenuItem><MenuLabel> People</MenuLabel><MenuRadioGroupvalue="1"><MenuRadioItemvalue="1"> Pedro Duarte</MenuRadioItem><MenuRadioItemvalue="2"> Colm Tuite</MenuRadioItem></MenuRadioGroup></MenuContent></Menu>