Navigation and related components Navigation User and Navigation Logo provide a consistent location and structure for users to navigate your application or experience.
Overview
Use Navigation along with Navigation Logo, and when applicable, Navigation User, to provide landmarks to the user. Navigation can also be useful for containing a Menu and Menu Items.
Navigation is expected to be positioned within the header slot of the Shell component.
Sample
Usage
- Serve as the primary method of navigating an application or experience.
- Contain an application's information hierarchy within slotted Menu and Menu Items components.
- Within the
headerslot of the Shell as a consistent location for interactive controls.
Accessibility
Keyboard navigation
| Key | Function |
|---|---|
Tab | Moves focus to the next focusable element. If the currently focused element is the last, the focus will leave the component. |
Tab and Shift | Moves focus to the previous focusable element. If the currently focused element is the first, the focus will leave the component. |
API reference
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
| label | label | When | string | |
| navigationAction | navigation-action | When | boolean | false |
| scale | scale | Specifies the size of the component. | Scale | "m" |
Slots
| Name | Description |
|---|---|
| logo | A slot for adding a |
| user | A slot for adding a |
| progress | A slot for adding a |
| navigation-action | A slot for adding a |
| content-start | A slot for adding a |
| content-center | A slot for adding a |
| content-end | A slot for adding a |
| navigation-secondary | A slot for adding a |
| navigation-tertiary | A slot for adding a |
Styles
| Name | Description |
|---|---|
| --calcite-navigation-width | Specifies the width of the component's content area. |
| --calcite-navigation-background | --calcite-navigation-background-color instead. Specifies the background color of the component. |
| --calcite-navigation-background-color | Specifies the component's background color. |
| --calcite-navigation-border-color | Specifies the component's border color. |
Events
| Name | Description | Behavior |
|---|---|---|
| calciteNavigationActionSelect | When |
Methods
| Name | Description | Signature |
|---|---|---|
| componentOnReady | Creates a promise that resolves once the component is fully loaded. | componentOnReady(): Promise<this> |
| setFocus | When | setFocus(options?: FocusOptions): Promise<void> |