Display more content in the Sidebar menu. The Drawer widget is an addition to the Sidebar menu that opens up to display more widgets. Useful for imputing more options within the sidebar menu and generally embedded within the header.
### Instance Options
| Option | Property | Comments | Default Value | Source |
| ----- |:-----:| ---- | ---- | ---- |
| Event Name| `event_name` | Event that the drawer listens to in order to trigger opening. | `nrToggleDrawer` | Instance |
### CSS/SASS Variables
*Dependencies are included and configured as part of the provided Update Set.*
| Variable | Comments |
| -------- |:---|
| `$nr-drawer-bg` | Background color of drawer. |
| `$nr-drawer-width` | Width of the drawer. |
| `$nr-drawer-veil-color` | Color of veil. |
| `$nr-drawer-transition` | Transition of drawer (slide out). |
| `$nr-drawer-default-open` | Sets the default checkbox color when unchecked. |
| `$nr-map-height` | Whether drawer is open by default. |
### Configuration
The widget now accepts dynamic event names through the event_name option and now accepts multiple widgets.
```json
{ Server Script:
var myItemsOptions = {
event_name: 'nrToggleMultipleWidgetDrawer',
widgets: [
{
widget_id: 'nr-mini-myitems',
widget_options: {
title: gs.getMessage('My Items')
}
},
{
widget_id: 'nr-approvals-list',
widget_options: {
title: gs.getMessage('My Approvals')
}
}
]
};
data.myItemsWidget = $sp.getWidget('nr-drawer', myItemsOptions);
var myOneItemOptions = {
event_name: 'nrToggleOneWidgetDrawer',
widget_id: 'nr-mini-myitems',
widget_options: {
title: gs.getMessage('My Items')
}
};
data.myOneItemWidget = $sp.getWidget('nr-drawer', myOneItemOptions);
widget_options: {
limit: 5
}
}
]
}
```