Nav Mega Menu Button
Overview
Use this component to add a button to your nav bar that toggles the display of a mega menu when pressed.
The nav mega menu is anchored to the nav bar. It spans the full height of the screen, but only takes as much width as it needs.
Development
Web component development
Component reference
rui-nav-mega-menu
Nav button that displays a mega menu when pressed
Name | Type | Default | Description |
---|---|---|---|
text | string | '' | Text displayed in the button |
iconType | string | '' | The name of the icon to display in the button. You can find a list of all enterprise icons here. The use of custom icons is also supported. Leave the iconType blank if you want to display initials based on the button text instead of an icon. For example, if the button text is “Additional Overrides” and no icon is specified, the button would display “AO” instead of an icon. |
iconInitials | string | '' | If you left iconType blank so that the button displays initials for the icon, you can use this property to override the initials displayed if you need to. You would typically only do this if the calculated initials were non-unique or unsuitable for any reason. |
badge | string | '' | Optional text that is highlighted to the right of the button text. Often used to display a count of data items that can be accessed when the user presses the button. |
isDisabled | boolean | false | Specifies whether the mega menu button is disabled. |
data-col-width | number | 200 | Data attribute specifying the width in pixels of each column in the mega menu. Leave this at the default value unless items are being clipped. |
data-row-height | number | 35 | Data attribute specifying the height in pixels of each row in the mega menu. You should only set this if your mega menu uses templates, in which case this defines the height of each template. |
Implementation
Begin by importing the rui-nav
module into your application.
The example below adds two mega menus to the nav bar:
- The first mega menu is data-driven and displays a simple mega menu item for each topic in the list.
- The second mega menu is static and breaks related navigation options into groups
Angular wrapper development
Wrapper reference
jha-nav-mega-menu
Nav button that displays a mega menu when pressed
Name | Type | Default | Description |
---|---|---|---|
jhaText | string | '' | Text displayed in the button |
jhaIconType | string | '' | The name of the icon to display in the button. You can find a list of all enterprise icons here. The use of custom icons is also supported. Leave the jhaIconType blank if you want to display initials based on the button text instead of an icon. For example, if the button text is “Additional Overrides” and no icon is specified, the button would display “AO” instead of an icon. |
jhaIconInitials | string | '' | If you left iconType blank so that the button displays initials for the icon, you can use this property to override the initials displayed if you need to. You would typically only do this if the calculated initials were non-unique or unsuitable for any reason. |
jhaBadge | string | '' | Optional text that is highlighted to the right of the button text. Often used to display a count of data items that can be accessed when the user presses the button. |
jhaTooltip | string | '' | Tooltip to display when the mouse hovers over the button |
jhaIsDisabled | boolean | false | Specifies whether the mega menu button is disabled. |
jhaColumnWidth | number | -1 | The width in pixels of each column in the mega menu. Leave this at the default value unless items are being clipped. |
jhaRowHeight | number | -1 | The height in pixels of each row in the mega menu. You should only set this if your mega menu uses templates, in which case this defines the height of each template. |
Implementation
Begin by importing the JhaMegaMenuModule
module into your application.
The example below adds two mega menus to the nav bar:
- The first mega menu is data-driven and displays a simple mega menu item for each topic in the list.
- The second mega menu is static and breaks related navigation options into groups
Design
Figma design
Dev Component | Design Component Name |
---|---|
Nav mega menu button | RUI / Nav / Mega Menu Button Available values for the State property:
Turn on the Collapsed property for a collapsed nav bar; leave it off for an expanded nav bar |
Nav button badge | RUI / Nav / Button Badge |
Adobe XD design
- Layout - Header, Expanded Nav, Function View
- Layout - Header, Collapsed Nav, Function View
- Layout - Nav Elements - Expanded Nav Bar
- Layout - Nav Elements - Collapsed Nav Bar
- Layout - Nav Mega Menu
- Layout - Header Elements – Basics
- Layout - Header Menu Buttons
- Layout - Header Mega Menu
- Layout - Mobile Application
- Layout - Tablet Application – Portrait
- Layout - Tablet Application - Landscape
Dev Component | Design Component Name |
---|---|
Nav mega menu button - expanded, inactive | JHA / Nav / Expanded / Mega Menu Button / Inactive |
Nav mega menu button - expanded, active | JHA / Nav / Expanded / Mega Menu Button / Active |
Nav mega menu button - collapsed, inactive | JHA / Nav / Collapsed / Mega Menu Button / Inactive |
Nav mega menu button - collapsed, active | JHA / Nav / Collapsed / Mega Menu Button / Active |