# Primary navigation
The primary navigation component is the main navigation of any dashboard, intended to allow users to navigate between different apps or external links.
# Usage
Use CiPrimaryNavigationItem's and their props to construct your menu.
Use the tooltip-text
prop to give your items a tooltip. This can be useful for letting users know what app the icon corresponds to.
# Variants
Variant prop can be used to change appearance of primary navigation. Available options are normal
and dark
. Default is normal
.
# Logo
Logo prop can be used to change the logo of the primary navigation. The default is Cirrus Insight Logo.
# Multiple menus
If desired, larger menus can be grouped into multiple menus. Use the more
slot to separate your menus.
# Popovers
Sometimes, an item in a menu may present a popover instead of navigating to a route or URL. When that happens, the item should not present a tooltip, to avoid confusion between seeing a tooltip be replaced by a popover. This means special care should be given to items opening a popover, as the icon should be clear enough to communicate what it is without the need for a tooltip.
Here, the info item opens a popover.
# Secondary menu
Primary navigation can be integrated with secondary navigation. To use it put ci-secondary-navigation
component in the same parent container as the primary navigation and pass required props to it.
# External Links
Use the target
property with the to
property to add a menu item that will open in a link in the desired target.
# Bottoms Slot
Use the bottom
slot to place content at the bottom of the Primary Navigation.
# Slots
Slot | Description |
---|---|
default | Used for all navigation custom content. Renders under top navigation icon |
more | Used to render additional navigation custom content below a divider |
bottom | Used to render custom content at the bottom of navigation |
# Interfaces
# PrimaryNavigationItem Interface
Property | Type | Description | Required |
---|---|---|---|
tooltip-text | String | Text to display on item hover tooltip | false |
icon | String | The icon for the menu item | true |
to | Route|string | A route or webpage to navigate to when clicked. | false |
focused | Boolean | Whether the item is focused or not. | false |
active | Boolean | Whether the item is active or not. | false |
subItems | SubMenuItem[] | All secondary navigation item list. Used when user wants to display secondary navigation. | false |
# SubMenuItem Interface
Each SubMenuItem can have the following properties. You cannot combine to
and onClick
and must choose only one for each item.
Property | Type | Description | Required |
---|---|---|---|
id | String | The unique id for the menu item | false |
text | String | The text for the menu item | true |
icon | String | The icon for the menu item | false |
to | Route|string | A route to navigate to when clicked. Cannot be combined with onCLick | false |
onClick | Function | The function to execute when clicked. Cannot be combined with to | false |
active | Boolean | Whether the item is active or not. If your app uses vue-router, this will be handled automatically | true |
← Popover Progress Bar →