DesignOverviewDesign SystemMapsGraphIntroductionInstallationDeriving a themeSandboxTheme builderVisual testingAgentsCortexMemoryActiveProvenanceActiveContextActiveServicesInsightsGet in touchSource on GitHub
Loading the reference
NavigationView sourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA set of destinations, with a marker on the current one.Also called Nav, NavList, and Tabs.StableSince 0.1.0NavigationImportimport'@fusion.dev/helix/navigation'import'@fusion.dev/helix-headless/navigation'Preview
GuidelinesWhen to use
Links to the sections of a site or an app, with the current page marked.NavigationThis page
Mark the current link with aria-current.The marker reads it, so the attribute a screen reader announces also places the marker.
Anatomy
1::part(nav)The navigation landmark.
2::part(indicator)The marker that moves to the current destination. It carries the destination's place and size as --indicator-x, --indicator-y, --indicator-inline-size and --indicator-block-size, and data-placed once it has been placed.
API referenceRoothelix-navigationA set of destinations, with a marker on the current one.
PropTypeDescriptionarrowsbooleanDefaultfalseWhether the arrow keys move focus between the destinations.currentLabelstringDefault"{name}, more destinations"The name of the button that opens the overflow menu, where every
destination has folded. {name} is the current destination's, which the
button shows.fallbackLabelstringDefault"Main"The name the element gives itself where label is empty.labelstringDefault""The landmark's name, read by screen readers.marker"segmented"|"underlined"How the destinations are drawn, with Tabs' three values and for the same
reasons.moreLabelstringDefault"More"The words on the button that opens the overflow menu, and the menu's name.orientation"vertical"Stacks the destinations in a column, for a sidebar, where unset is a row
for a header or a footer. The marker follows the current destination down
the column as it does along the row.overflow"scroll"What a row too narrow for its destinations does. Unset, the destinations
that do not fit fold into the overflow menu. scroll keeps them all on
the row and scrolls it inside itself, for a strip read by swiping.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The destinations, as your own links.indicatorA marker of your own, drawn inside the indicator part, where the current destination's place and size reach it.menu-iconReplaces the glyph on the overflow button where it is too narrow for words.more-iconReplaces the caret on the button that opens the overflow menu.
PartDescriptionhighlightThe wash under the pointer, which glides from destination to destination while a mouse or pen moves along them. It carries the destination's place and size as the indicator does, data-placed while it is over one, and data-gliding from the frame after it arrives. Hidden until a stylesheet shows it, so the headless tier lays out as it did without it.indicatorThe marker that moves to the current destination. It carries the destination's place and size as --indicator-x, --indicator-y, --indicator-inline-size and --indicator-block-size, and data-placed once it has been placed.moreThe button that opens the overflow menu, drawn after the last destination on the row while any has folded.more-currentThe current destination's name on the button, while every destination has folded.more-glyphThe glyph on the button where it is too narrow for words, where none is slotted.more-labelThe button's name, more-label, while the current destination is still on the row.more-markThe caret on the button, where none is slotted.navThe navigation landmark.overflowThe menu of the destinations that do not fit on the row.overflow-backThe control that returns from a submenu.overflow-back-markThe glyph on the back control of a submenu.overflow-emptyThe text shown when the menu has no items.overflow-headerThe bar above a submenu, holding the way back and its name.overflow-highlightForwarded from the menu: the wash on the row with focus, which glides from row to row.overflow-liveThe overflow menu's live region, which repeats the empty and loading text for screen readers.overflow-loadingThe text shown while the items are loading.overflow-optionOne destination in the overflow menu, a link to its address. Checked where it is the current one.overflow-option-endA destination's trailing column.overflow-option-itemA destination's row, an <a>.overflow-option-markThe check beside the current destination.overflow-option-shortcutA destination's key.overflow-option-shortcut-kbdThe key inside it.overflow-option-shortcut-keyOne key of a destination's chord.overflow-option-shortcut-separatorThe + between two keys of a destination's chord.overflow-option-startA destination's leading column.overflow-option-surfaceA destination's submenu panel, which a destination does not open.overflow-search-fieldThe overflow menu's filter field, drawn with filterable.overflow-surfaceThe floating panel the overflow menu is drawn on.overflow-titleThe name of the submenu that is showing.
CSS PropertyDescription--navigation-block-sizeHeight of the bar in a row. Each destination fills it.--navigation-gapSpace between destinations.--navigation-indicator-colorFill of the marker on the current destination: the bar under underlined, and the pill otherwise.--navigation-indicator-radiusCorner radius of the marker.--navigation-indicator-shadowShadow under the marker, for a marker that sits raised on the bar, as segmented draws it.--navigation-indicator-thicknessHeight of the bar under underlined, and its width down a column.--navigation-item-colorText color of a destination that is not the current one. Read by the page's stylesheet, which styles the links you slot.--navigation-item-current-colorText color of the current destination, the one marked aria-current="page".--navigation-item-current-font-weightWeight of the current destination's text.--navigation-item-font-sizeSize of a destination's text.--navigation-item-font-weightWeight of a destination's text.--navigation-item-hover-background-colorBackground of a destination under the pointer.--navigation-item-hover-colorText color of a destination under the pointer.--navigation-item-padding-inlineSpace either side of a destination's text.--navigation-item-radiusCorner radius of a destination, which its hover background follows.--navigation-rule-colorColor of the rule under the row in underlined.
Custom stateDescriptionfoldedWhile any destination has folded into the overflow menu.glidingWhile a mouse or pen is over a destination, so the highlight draws the hover wash in place of each destination's own.openWhile a megamenu or another disclosure among the destinations is open.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Roothelix-headless-navigationA set of destinations, with a marker on the current one.
PropTypeDescriptionarrowsbooleanDefaultfalseWhether the arrow keys move focus between the destinations.currentLabelstringDefault"{name}, more destinations"The name of the button that opens the overflow menu, where every
destination has folded. {name} is the current destination's, which the
button shows.fallbackLabelstringDefault"Main"The name the element gives itself where label is empty.labelstringDefault""The landmark's name, read by screen readers.marker"segmented"|"underlined"How the destinations are drawn, with Tabs' three values and for the same
reasons.moreLabelstringDefault"More"The words on the button that opens the overflow menu, and the menu's name.orientation"vertical"Stacks the destinations in a column, for a sidebar, where unset is a row
for a header or a footer. The marker follows the current destination down
the column as it does along the row.overflow"scroll"What a row too narrow for its destinations does. Unset, the destinations
that do not fit fold into the overflow menu. scroll keeps them all on
the row and scrolls it inside itself, for a strip read by swiping.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The destinations, as your own links.indicatorA marker of your own, drawn inside the indicator part, where the current destination's place and size reach it.menu-iconReplaces the glyph on the overflow button where it is too narrow for words.more-iconReplaces the caret on the button that opens the overflow menu.
PartDescriptionhighlightThe wash under the pointer, which glides from destination to destination while a mouse or pen moves along them. It carries the destination's place and size as the indicator does, data-placed while it is over one, and data-gliding from the frame after it arrives. Hidden until a stylesheet shows it, so the headless tier lays out as it did without it.indicatorThe marker that moves to the current destination. It carries the destination's place and size as --indicator-x, --indicator-y, --indicator-inline-size and --indicator-block-size, and data-placed once it has been placed.moreThe button that opens the overflow menu, drawn after the last destination on the row while any has folded.more-currentThe current destination's name on the button, while every destination has folded.more-glyphThe glyph on the button where it is too narrow for words, where none is slotted.more-labelThe button's name, more-label, while the current destination is still on the row.more-markThe caret on the button, where none is slotted.navThe navigation landmark.overflowThe menu of the destinations that do not fit on the row.overflow-backThe control that returns from a submenu.overflow-back-markThe glyph on the back control of a submenu.overflow-emptyThe text shown when the menu has no items.overflow-headerThe bar above a submenu, holding the way back and its name.overflow-highlightForwarded from the menu: the wash on the row with focus, which glides from row to row.overflow-liveThe overflow menu's live region, which repeats the empty and loading text for screen readers.overflow-loadingThe text shown while the items are loading.overflow-optionOne destination in the overflow menu, a link to its address. Checked where it is the current one.overflow-option-endA destination's trailing column.overflow-option-itemA destination's row, an <a>.overflow-option-markThe check beside the current destination.overflow-option-shortcutA destination's key.overflow-option-shortcut-kbdThe key inside it.overflow-option-shortcut-keyOne key of a destination's chord.overflow-option-shortcut-separatorThe + between two keys of a destination's chord.overflow-option-startA destination's leading column.overflow-option-surfaceA destination's submenu panel, which a destination does not open.overflow-search-fieldThe overflow menu's filter field, drawn with filterable.overflow-surfaceThe floating panel the overflow menu is drawn on.overflow-titleThe name of the submenu that is showing.
Custom stateDescriptionfoldedWhile any destination has folded into the overflow menu.glidingWhile a mouse or pen is over a destination, so the highlight draws the hover wash in place of each destination's own.openWhile a megamenu or another disclosure among the destinations is open.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Examples
NameDescriptionMarkerThe current page marked by the resting pill with nothing behind the row, by a bar on a rule under the row with underlined, and by a raised pill in a sunken track with segmented.OverflowSix destinations, where the ones that do not fit on a narrow row fold into a More menu.PreviewLinks with the current page marked by a marker that moves to it.PreviewLinks with the current page marked by a marker that moves to it.