Skip to main content

Topbar


The widget appears as an icon on the right side of the bar along the top of the Facilio application interface. Clicking the icon opens the widget.


topBar


Triggers#

FunctionDescriptionExample
showMenuShows the menu icon on the topbarapp.interface.trigger(‘showMenu’, {menu: true});
showHeaderShow or hide the side panel headerapp.interface.trigger(‘showHeader’, {header: true});
hideHides the side panelapp.interface.trigger(‘hide’);
resizeResize the side panelapp.interface.trigger(‘resize’, {height: ‘100%’});
setBadgeSet notification badge on the menu iconconst badgeOptions = {
value: 20,
max: 100,
isDot: false
};
app.interface.trigger(‘setBadge’, badgeOptions);
resetBadgeReset notification badge countapp.interface.trigger(‘resetBadge’);
setIconSet icon for the topbar menuconst iconName = ‘help’;
app.interface.trigger(‘setIcon’, {icon: iconName});

Events#

EventDescriptionExample
topbar.activeThis event will be triggered whenever the topbar panel is openedapp.on(‘topbar.active’, () => {
console.log(‘topbar is opened’);
});
topbar.inactiveThis event will be triggered whenever the topbar panel is closedapp.on(‘topbar.inactive, () => {console.log(‘topbar is closed);
});

On This Topic