Changelog Azalea Kit UI 101 Usage Customizing Utilities Form controls Laravel Vue FHIR Types Accessibility Icons Actions Button Button group Layout and structure Card Card section Care summary Care timeline Divider Empty state Footer Header Layout Stack Table Selection and input Calendar Checkbox Checkbox group Color picker Combobox Combobox option Input Input mask Memorable date Number input Option Phone input Radio Radio button Radio group Range Select SSN input Tag Textarea Toggle ZIP code input Images and icons Avatar Icon Icon button Logo Feedback indicators Badge Banner Progress bar Skeleton Skeleton body text Skeleton display text Skeleton thumbnail Spinner Typography Text Navigation Breadcrumb Breadcrumb item Dropdown Menu Menu item Menu label Navigation Nav group Nav item Nav toggle Pagination Tab Tab group Tab panel Top bar Tree Tree item User menu Overlays Dialog Popover Tooltip Utilities Collapsible FHIR address FHIR human name FHIR quantity FHIR questionnaire Format bytes Format date Format number Relative time Resize observer Split panel Tooltip Border Color Shadow Spacing Transition Typography Z-index Contributing Visual Tests Light Dark System

Nav Group

<ahi-nav-group> | AhiNavGroup

Navigation group includes all the actions or items in a single group and is used for grouping items into related categories.

Dashboard Messages
<ahi-nav-group title="Navigation" style="max-width: 256px;">
  <ahi-nav-item href="#" icon="home" active>Dashboard</ahi-nav-item>
  <ahi-nav-item href="#" icon="mail">Messages</ahi-nav-item>
</ahi-nav-group>

Inside a navigation rail

When Layout is showing a rail it publishes --ahi-nav-rail: 1 onto its navigation region, and that value inherits down into every nav group. Nav group picks it up on its own — a consumer sets nav-rail on the layout and nothing else.

A rail is too narrow for a group heading, so in one the heading is taken out of sight rather than left to be clipped by the rail’s edge:

  • The heading is hidden visually but kept in the accessibility tree, because it is what names the group’s list. display: none would leave every railed group anonymous.
  • A group that follows another one is separated by a divider in place of its heading, so two consecutive groups still read as two groups.
  • The first group gets no divider and no heading space, so a rail does not open with a stray rule under the navigation’s own header. A single group — one ahi-nav-group wrapping a whole navigation — is the same case, and comes out with neither.

Nothing above applies outside a rail; it is all inside a single style query, so a group that is not in one renders exactly as it always has.

Importing

Script Bundler

To import this component using a script tag:

<script type="module" src="/path/to/azalea-kit-ui/dist/components/nav-group/nav-group.js"></script>

To import this component using a bundler:

import '@azaleahealth/azalea-kit-ui/dist/components/nav-group/nav-group.js';

Slots

Name Description
(default) The default slot used for the navigation items.

Learn more about using slots.

Properties

Name Description Type Default
title The nav group’s title. string ''
updateComplete A read-only promise that resolves when the component has finished updating.

Learn more about properties and attributes.

CSS Parts

Name Description
base Deprecated. Use the nav-group part instead.
nav-group The component’s outer wrapper.
header The navigation group’s header.
title The navigation group’s title.

Learn more about customizing CSS parts.