Header Navigation
Render three-level navigation in a hover menu.
Documentation
Using the Header Navigation
ff-header-navigation uses a different approach from other elements. Add the element to create a three-layer navigation.
<ff-header-navigation></ff-header-navigation>The first layer is the always-visible navigation bar. It contains FactFinder categories. The second and third layers appear when users hover over a first-layer element.
Layer 2 contains groups.
Layer 3 contains links inside a group.
Configuration
ff-header-navigation provides options for loading and displaying data.
group-count
group-count controls how many layer-2 groups appear in the hover container. The default is 10.
<ff-header-navigation group-count="6"></ff-header-navigation>group-size
group-size controls how many layer-3 links appear in each group. The default is 4.
<ff-header-navigation group-size="5"></ff-header-navigation>hide-empty-groups
Set hide-empty-groups to hide groups without links. It defaults to true.
fetch-initial
Set fetch-initial="false" to load data manually. Call fetch() to load or reload the navigation.
Dynamic content
Add custom content, such as an ad banner or group-specific image, around groups or after individual groups.
Container slots
Four container slots surround the group area: top, bottom, left, and right.
Add a slot attribute using this pattern:
This example adds content to every container slot for the Bike group:
Group slots
Use a group name as the slot name to add custom content after that group's links:
Rendered HTML
The internal navigation structure is fixed. Style it with CSS. A navigation can render the following structure:
Manipulating navigation URLs
FactFinder configures each navigation URL. Change them client-side when navigation must open a new page with a full reload. By default, ff-header-navigation changes pages in place.
Subscribe to the ResultDispatcher navigation event:
navData contains an array for each FactFinder cluster level:
Set a URL with navEl.__TARGET_URL__.setUrl(). Each navigation element also exposes __SUB_ELEMENTS__, an array containing its direct children.
Demo
Try the Header Navigation demo.
API code
Properties
Methods
Events
Last updated
Was this helpful?