Sidebar MenuItem properties
Usage
const data = [
{
type: "menuItem",
id?: string | number,
parent?: string,
value?: string,
items?: IMenuElement[], // ISpacer | ISeparator | IMenuItem
count?: number,
countColor?: "danger" | "secondary" | "primary" | "success",
hotkey?: string,
html?: string,
icon?: string,
tooltip?: string,
css?: string | string[],
disabled?: boolean,
hidden?: boolean,
},
// more Sidebar controls
]
Description
type | (required) the type of a control, set it to "menuItem". If not specified - the "navItem" type is applied by default. |
id | (optional) the id of a control, auto-generated if not set |
parent | (optional) the parent of the item |
value | (optional) a value for the menu item. You need to set either the value or html property to the item |
items | (optional) an array of children controls (note that all the children should have the type menuItem) |
count | (optional) a badge with a number |
countColor | (optional) the color of a badge with number: "danger" | "secondary" | "primary" | "success" |
hotkey | (optional) the name of a keyboard shortcut for a menu item |
html | (optional) a string with HTML that should be inserted into the menu item |
icon | (optional) the name of an icon from the used icon font |
tooltip | (optional) a tooltip for the menuItem |
css | (optional) adds style classes |
disabled | (optional) defines whether an item is disabled |
hidden | (optional) defines whether a control is hidden |
Related article: MenuItem