Header
Overview
The header component displays at the top of your application.
It includes:
- A left section that displays the hamburger button and your app title
- A search box in the middle
- A right section for displaying admin options and any environmental context.
Development
Web component development
Component reference
rui-header
Application header bar; contains rui-header-left and rui-header-right sections
Name | Type | Default | Description |
---|---|---|---|
displaySearch | boolean | false | Set this to true to display a search box in the header. Note that the search box does not display at mobile size. |
searchWidth | string | '50%' | Specifies the width of the search box. Use CSS notation appropriate for the “size” CSS attribute. All width in the header that isn’t used by rui-header-left and rui-header-right is reserved for the search box.
|
searchWatermarkText | string | 'SEARCH' | The watermark text displayed in the search box until the user enters search text. We recommend using an upper-case value for the watermark text in most cases. |
clearOnSearch | boolean | true | Clear the user’s search text from the header search box after a search is initiated? |
isHidden | boolean | false | Set this to true if your application should not display a header. This should be extremely rare for any Jack Henry application. |
rui-header-search | event | Event fired when the user presses the enter key or the search button within the search box. The search text is passed in the custom event’s detail. |
rui-header-left
Left section within header bar; contains hamburger button, optional back button, and header title
Name | Type | Default | Description |
---|---|---|---|
displayBackButton | boolean | false | Set this to true if you want to provide back button functionality when your app is not running within a browser, such as in Xperience or Electron. |
rui-back-button-click | event | Event fired when the user presses the back button. |
rui-header-right
Right section within header bar; contains admin options
Name | Type | Default | Description |
---|---|---|---|
displayLightDarkModeSelector | boolean | true | Specifies whether to include a dropdown at the far right edge of the header that allows the user to switch between always using light mode, always using dark mode, or using the device setting for light/dark mode. |
Implementation
Begin by importing the rui-header
module into your application.
Then define the header within your main-header
component.
- Use a
rui-header
tag as the outermost element in that view. - Within the
rui-header
tag:- Nest a
rui-header-left
tag to contain elements on the left side of the header.- The left side of the header automatically displays the hamburger button; you don’t have to do anything to get that.
- The left side also typically displays your application name.
- Nest a
rui-header-right
tag to contain elements on the right side of the header.- The right side of the header is typically used to display header buttons, header dropdowns, and header mega menus.
- Nest a
rui-header
that are not contained within either rui-header-left
or rui-header-right
.Angular wrapper development
Wrapper reference
jha-header
Application header bar; contains jha-header-left and jha-header-right sections
Name | Type | Default | Description |
---|---|---|---|
jhaDisplaySearch | boolean | false | Set this to true to display a search box in the header. Note that the search box does not display at mobile size. |
jhaSearchWidth | string | '50%' | Specifies the width of the search box. Use CSS notation appropriate for the “size” CSS attribute. All width in the header that isn’t used by jha-header-left and jha-header-right is reserved for the search box.
|
jhaSearchWatermarkText | string | 'SEARCH' | The watermark text displayed in the search box until the user enters search text. We recommend using an upper-case value for the watermark text in most cases. |
jhaIsHidden | boolean | false | Set this to true if your application should not display a header. This should be extremely rare for any Jack Henry application. |
jhaSearch | event | Event fired when the user presses the enter key or the search button within the search box. This event passes the search text as a string parameter to the event handler. |
jha-header-left
Left section within header bar; contains hamburger button, optional back button, and header title
Name | Type | Default | Description |
---|---|---|---|
jhaDisplayBackButton | boolean | false | Set this to true if you want to provide back button functionality when your app is not running within a browser, such as in Xperience or Electron. |
jhaBackButtonClicked | event | Event fired when the user presses the back button. | |
jhaNavToggled | event | Event fired when the user presses the hamburger button. The event provides one string argument with a value of either “Expanded” or “Collapsed”, indicating the new state for the nav bar. |
jha-header-right
Right section within header bar; contains admin options
Name | Type | Default | Description |
---|---|---|---|
jhaDisplayLightDarkModeSelector | boolean | true | Specifies whether to include a dropdown at the far right edge of the header that allows the user to switch between always using light mode, always using dark mode, or using the device setting for light/dark mode. |
Implementation
Begin by importing the JhaHeaderModule into your application.
Then define the header within your main-header
component.
- Use a
jha-header
tag as the outermost element in that view. - Within the
jha-header
tag:- Nest a
jha-header-left
tag to contain elements on the left side of the header.- The left side of the header automatically displays the hamburger button; you don’t have to do anything to get that.
- The left side also typically displays your application name.
- Nest a
jha-header-right
tag to contain elements on the right side of the header.- The right side of the header is typically used to display header buttons, header dropdowns, and header mega menus.
- Nest a
jha-header
that are not contained within either jha-header-left
or jha-header-right
.Dynamically hiding and showing header elements
You can dynamically hide and show elements in the header, based on two different kinds of criteria:
- Screen Width: Part of responsive layout is adjusting screen elements accordingly to fit the screen width.
- Use CSS media query classes to cover application-specific breakpoints.
- For example, say the elements in the left side of your header start to collide with elements in the right side of your header at 876 pixels. You can add your own application-specific classes that define one layout at 877 pixels and define a different layout at 876 pixels and less.
- Contextual Data: Sometimes you need to hide or display elements based on contextual criteria, such as whether the user is logged in yet or whether the user has access to certain features in the app.
- In Angular, use the
*ngIf
directive to conditionally display elements based on data in your controller.
- In Angular, use the
Component playground
Design
Figma design
Dev Component | Design Component Name |
---|---|
Header bar | RUI / Header / Header Bar |
Search box in header | RUI / Header / Search |
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 |
---|---|
Header bar | JHA / Header / Header Bar |
Search box in header | JHA / Header / Search |