Nav
Overview
![Application layout navigation](../../../fundamentals/application-layout/ApplicationLayoutNav.png)
The nav bar component displays at the left side of your application, presenting the primary navigation options to your users.
The nav bar can include:
- Navigation buttons that let the user navigate to a single function
- Navigation mega menus that let the user choose from a large menu of functions to navigate to
- Optional separators that can be used to visually group related navigation items
Development
Web component development
Component reference
rui-nav
Presents the primary navigation options for your application
Name | Type | Default | Description |
---|---|---|---|
displayState | string | 'expanded' | By default, when your application loads, the nav bar is collapsed at mobile size and is expanded at larger sizes. If you need to override that behavior, set this property to a value of ‘collapsed’ if you want the nav bar always initially collapsed regardless of screen size, or set this to a value of ’expanded’ if you want the nav bar always initially expanded, regardless of screen size. Note that this only defines the initial expanded/collapsed state; the user can manually expand and collapse the nav bar at will. |
isHidden | boolean | false | Set this to true if your application should not display a navigation bar. This should be extremely rare for any Jack Henry application. |
expandOnHoverWidth | number | 230 | This property is deprecated and will be removed in a future release. |
rui-nav-display-state | event | Fired when the nav bar display state changes. The current display state — ’expanded’ or ‘collapse’ — is sent in the event detail. You can listen for this event if you want to store the most recent expanded/collapsed state in local storage in order to restore the nav bar state the next time the user starts the application. |
Implementation
Begin by importing the rui-nav
module into your application.
Define your app’s primary navigation options within the main-nav
component. Use a rui-nav
tag as the outermost element in that view.
If the navigation bar is collapsed, it will temporarily expand when the user hovers the mouse over it. If the text for any nav bar elements is being truncated with ellipses, you can override the width of the expand-on-hover navigation bar by changing the value of the expandOnHoverWidth
numeric attribute in rui-nav. The default value is 230, but you can increase this to fit your items with long names.
rui-nav also has a displayState
attribute that allows you to override the default initial expand/collapse state (initially expanded at desktop size and initially collapsed at tablet size). Specify a value of “collapsed” if the nav bar should be initially collapsed regardless of screen width. Specify a value of “expanded” if the nav bar should be initially expanded regardless of screen width. Omit this attribute if you want the default initial expanded/collapsed state described above.
Angular wrapper development
Wrapper reference
jha-nav
Presents the primary navigation options for your application
Name | Type | Default | Description |
---|---|---|---|
jhaInitialState | string | '' | Omit this attribute to get the default initial behavior, where the nav bar is collapsed at smaller sizes and expanded at larger sizes. If you need to override that behavior, set this to ‘Collapsed’ if you want the nav bar always initially collapsed regardless of screen size, or set this to ‘Expanded’ if you want the nav bar always initially expanded regardless of screen size. Note that this only defines the initial expanded/collapsed state; the user can manually expand and collapse the nav bar at will. |
jhaIsHidden | boolean | false | Set this to true if your application should not display a navigation bar. This should be extremely rare for any Jack Henry application. |
jhaExpandOnHoverWidth | number | 230 | This property is deprecated and will be removed in a future release. |
Implementation
Begin by importing the JhaNavModule into your application.
Define the navigation within your main-nav
component. Use a jha-nav
tag as the outermost element in that view. It has a jhaIsHidden
attribute that you can bind to a Boolean value in your controller to specify when the navigation should be hidden. You should hide the navigation when your application is hosted within Xperience.
If the navigation bar is collapsed but temporarily expanded on hover, then any items with text too long to fit in the nav bar are truncated with ellipses. If you see this happening, you can override the width of the expand-on-hover navigation bar by changing the value of the jhaExpandOnHoverWidth
numeric attribute in jha-nav. The default value is 230, but you can increase this to fit your items with long names.
jha-nav also has a jhaInitialState
attribute that allows you to override the default initial expand/collapse state (initially expanded at desktop size and initially collapsed at tablet size). Specify a value of “collapsed” if the nav bar should be initially collapsed regardless of screen width. Specify a value of “expanded” if the nav bar should be initially expanded regardless of screen width. Omit this attribute if you want the default initial expanded/collapsed state described above.
Design
Figma design
Dev Component | Design Component Name |
---|---|
Nav bar | RUI / Nav / Nav Bar Turn on the Collapsed property for a collapsed nav bar; leave it off for an expanded nav bar |
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 bar - expanded | JHA / Nav / Expanded / Nav Bar |
Nav bar - collapsed | JHA / Nav / Collapsed / Nav Bar |