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.
<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: nonewould 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-groupwrapping 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
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.