Skip to main content

Menu

A control for presenting a menu of actions.

info

You can use Text, Divider, Button, Section, Toggle and Menu as children of Menu.

Example​

<Menu title="Click Me!">
<Text>Some text</Text>
<Divider />
<Button
title="Delete"
role="destructive"
action={deleteItem}
systemImage="trash"
/>
<Section header="Section">
<Text>Item 1</Text>
<Text>Item 2</Text>
<Text>Item 3</Text>
</Section>
<Menu title="Sub menu">
<Text>Sub menu item</Text>
</Menu>
</Menu>

Props​

List inherits all View Modifiers as props.

propdescriptiontyperequireddefault
childrenMenu contentReactNodenonull
titleMenu titlestringnoundefined
systemImageSF Symbol namestringnoundefined
primaryActionMenu primary action when clicked() => voidnoundefined