Skip to content

Intrasheets Custom Menu

The menu property lets developers enhance Intrasheets by adding, modifying, or removing menu options to integrate new features. During initialisation, use the menu() method to create custom items and embed specific workflows or utilities directly into the interface.

The menu() function intercepts and customizes default menu options as needed during initialization.

MethodDescription
menu(object[])Intercept the top menu options.
intrasheets({
bar: {
suggestions: true
},
client: {
url: 'http://localhost:3009',
auth: {
token: token,
invitation: invitation,
},
onerror: function(e) {
jSuites.notification(e);
},
},
menu: function(options) {
// Default options
}
})

Configure each item with properties that enhance usability:

PropertyDescription
title: stringText displayed for the menu item, expandable in wide layouts.
submenu: Item[]Array of sub-items creating a dropdown for related features.
icon: stringMaterial icon keyword to visually represent the item.
type: stringDefines item type: "line" for separators or "item" for clickable options.
shortcut: stringKeyboard shortcut for quick access.
disabled: booleanDisables the item if set to true.
tooltip: stringTooltip text shown on hover, providing additional context.

Use events to add interactivity and functionality:

EventDescription
onclickExecutes on click, ideal for feature-specific actions.
renderCustomizes item display, allowing for dynamic

The Intrasheets top menu is built using the LemonadeJS JavaScript Top Menu. Please refer to the documentation for more details.

LemonadeJS Top Menu Component


intrasheets({
bar: {
suggestions: true
},
client: {
url: 'http://localhost:3009',
auth: {
token: token,
invitation: invitation,
},
onerror: function(e) {
jSuites.notification(e);
},
},
menu: function(options) {
// Remove the last option
options.shift();
}
})