@hoststack/ui / components / IMenu
Defined in: components.ts:577
Menu component props - dropdown menu with nested options
<Menu
trigger={<Button>Menu</Button>}
options={[
{ label: "Edit", value: "edit", icon: <EditIcon /> },
{ label: "Delete", value: "delete", icon: <DeleteIcon /> }
]}
onSelection={(value, label) => console.log(value, label)}
/>
optionalariaLabel:string
Defined in: components.ts:579
Accessible label for the menu container
optionalchildren:ReactNode| (close) =>ReactNode
Defined in: components.ts:581
Additional content to render in the menu - can be ReactNode or a function that receives the close function
optionalcss:CSS
Defined in: components.ts:583
Custom CSS styles
optionalinitial:string
Defined in: components.ts:585
Initially selected option value
optionalonSelection: (value,label) =>void
Defined in: components.ts:587
Callback when menu option is selected
string
string
void
options:
object[]
Defined in: components.ts:589
Array of menu options
optionalicon:ReactNode
optionaliconPosition:"left"|"right"
label:
string
value:
string
trigger:
ReactNode
Defined in: components.ts:596
Element that triggers the menu
optionaltriggerCSS:CSS
Defined in: components.ts:598
Custom CSS styles for the trigger
optionalwrapperCSS:CSS
Defined in: components.ts:600
Custom CSS styles for the menu wrapper
optionallogo:ReactNode
Defined in: components.ts:602
Logo to display in the menu header