Skip to main content

Menu

  • Your Profile
    ⌘ + P
  • Account Settings
    ⌘ + S
  • Support
    This is a string of text that will help the user decide which action to take.
  • Refer a Friend
  • Sign Out
import { Menu } from '@tulsa/core';

<Menu>
<Menu.Item
leadingVisual={<BiUser color='inherit' fontSize={"1.1em"} />}
trailingVisual={"⌘ + P"}
>
Your Profile
</Menu.Item>
<Menu.Item
leadingVisual={<BiAlarm color='inherit' fontSize={"1.1em"} />}
trailingVisual={"⌘ + S"}
>
Account Settings
</Menu.Item>
<Menu.Divider isRowDivider />
<Menu.Item
description='This is a string of text that will help the user decide which action to take.'
leadingVisual={<BiQuestionMark color='inherit' fontSize={"1.1em"} />}
trailingVisual={<BiChevronRight color='inherit' fontSize={"1.2em"} />}
>
Support
</Menu.Item>
<Menu.Item variant='dangerous' selected trailingVisual={<BiChevronRight color='inherit' fontSize={"1.2em"} />}>Refer a Friend</Menu.Item>
<Menu.Divider />
<Menu.Item variant='dangerous'>Sign Out</Menu.Item>
</Menu>

Props

HTMLProps<"ul">

Props

NameTypeDescriptionDefault
variant'default' | 'dangerous' | 'success'Controls the look & feel of the item"default"
disabledbooleanSets whether or not the button is displayed as disabled or not
selectedbooleanSets whether or not the button is displayed as selected or not
onSelect(): anyAction that will triggered on click
leadingVisualstring | React.ReactElementAn element that will appear before the items's content
leadingVisualPropsHTMLProps<"span">Props that will be applied to the root component of the leading visual
trailingVisualstring | React.ReactElementAn element that will appear after the items's content
trailingVisualPropsHTMLProps<"span">Props that will be applied to the root component of the trailing visual
descriptionstringDetails of the item that will appear below the main content
asTControls the root element that is used by the item. Can be an HTML element string or a React component"li"

Native props are forwarded to the root component.

Props

NameTypeDescriptionDefault
isRowDividerbooleanIf true, alters the margins of the divider for rows, as opposed to groups

Native props are forwarded to the root component.