Menu
A menu block used to display page links.
Block
Block Setup
id: block_id
type: Menu
properties:
selectedKeys: []
defaultOpenKeys: []
links:
- id: home
type: MenuLink
pageId: home
properties:
icon: HomeOutlined
title: Home
danger: false
links: []
style: null
- id: pages
type: MenuGroup
properties:
title: Pages
icon: LayoutOutlined
danger: false
links:
- id: page1
type: MenuLink
pageId: page1
properties:
title: Page 1
danger: false
style: null
- id: more_pages
type: MenuGroup
links:
- id: page3
type: MenuLink
pageId: page3
pageId: null
properties:
danger: false
title: null
style: null
pageId: null
style: null
Settings
Menu JSON Schema Definition
type: object
properties:
events:
additionalProperties: false
properties:
onClick:
description: Trigger action when menu item is clicked.
type: array
onSelect:
description: Trigger action when menu item is selected.
type: array
onToggleMenuGroup:
description: Trigger action when mobile menu group is opened.
type: array
type: object
properties:
additionalProperties: false
properties:
backgroundColor:
description: Menu background color.
type: string
defaultOpenKeys:
description: Array with the keys of default opened sub menus.
items:
description: A menu item 'id' which should be open by default.
type: string
type: array
forceSubMenuRender:
default: false
description: Render submenu into DOM before it becomes visible.
type: boolean
links:
items:
properties:
id:
description: Menu item id.
type: string
links:
items:
properties:
id:
description: Menu item id.
type: string
pageId:
description: Page to link to.
type: string
properties:
description: properties from menu item.
links:
items:
properties:
id:
description: Menu item id.
type: string
pageId:
description: Page to link to.
type: string
properties:
description: properties from menu item.
properties:
danger:
default: false
description: Apply danger style to menu item.
type: boolean
title:
description: Menu item title.
type: string
type: object
style:
description: Css style to applied to sub-link.
type: object
type:
default: MenuLink
description: Menu item type.
enum:
- MenuLink
type: string
required:
- id
- type
type: object
type: array
properties:
danger:
default: false
description: Apply danger style to menu item.
type: boolean
title:
description: Menu item title.
type: string
type: object
style:
description: Css style to applied to sub-link.
type: object
type:
default: MenuLink
description: Menu item type.
enum:
- MenuLink
- MenuGroup
type: string
required:
- id
- type
type: object
type: array
pageId:
description: Page to link to.
type: string
properties:
description: properties from menu item.
properties:
danger:
default: false
description: Apply danger style to menu item.
type: boolean
icon:
description: >-
Name of an Ant Design Icon or properties of an Icon block to
customize icon on menu item.
type:
- string
- object
title:
description: Menu item title.
type: string
type: object
style:
description: Css style to applied to link.
type: object
type:
default: MenuLink
description: Menu item type.
enum:
- MenuLink
- MenuGroup
type: string
required:
- id
- type
type: object
type: array
menuId:
description: App menu id used to get menu links.
type: string
mode:
default: vertical
description: Type of menu to render.
enum:
- vertical
- horizontal
- inline
type: string
selectedColor:
description: Menu primary selected color.
type: string
selectedKeys:
description: Array with the keys of currently selected menu items.
items:
description: A menu item 'id' to be displayed as selected.
type: string
type: array
subMenuCloseDelay:
description: Delay time to hide submenu when mouse leaves (in seconds).
type: number
subMenuOpenDelay:
description: Delay time to show submenu when mouse enters (in seconds).
type: number
theme:
default: dark
description: Color theme of menu.
enum:
- dark
- light
type: string
type: object