For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

API code

Properties

Properties
Name
Description

group-count (Number) (default: 10)

Number of layer-2 groups shown inside the hover container.

group-size (Number) (default: 4)

Limits links rendered inside a group.

hide-empty-groups (String) Options: "true", "false" (default: "true")

Hides layer-2 groups with no layer-3 links.

fetch-initial (String) Options: "true", "false" (default: "true")

Requests navigation data on the first DOM attachment.

mouseenterDelay (Number) (default: 600)

Delays the mouse-enter event in milliseconds.

mouseleaveDelay (Number) (default: 200)

Delays the mouse-leave event in milliseconds.

Methods

Methods
Name
Description

fetch()

Triggers a new fetch of navigation data.

Events

Events
Name
Description

dom-updated

Triggered when the element receives data and templates render.

Last updated

Was this helpful?