Skip to main content

SideNavigationItem

<ui5-side-navigation-item> | Since 1.0.0-rc.8

Represents a navigation action. It can provide sub items. The ui5-side-navigation-item is used within ui5-side-navigation or ui5-side-navigation-group only.

ES6 Module Import

import "@ui5/webcomponents-fiori/dist/SideNavigationItem.js";

Properties

expanded

DescriptionDefines if the item is expanded
Typeboolean
Defaultfalse

icon

DescriptionDefines the icon of the item.
The SAP-icons font provides numerous options.
See all the available icons in the Icon Explorer.
Typestring | undefined
Defaultundefined

selected

DescriptionDefines whether the item is selected.
Note: Items that have a set href and target set to _blank should not be selectable.
Typeboolean
Defaultfalse

href

DescriptionDefines the link target URI. Supports standard hyperlink behavior. If a JavaScript action should be triggered, this should not be set, but instead an event handler for the click event should be registered.
Typestring | undefined
Defaultundefined
Since1.19.0

target

DescriptionDefines the component target.
Possible values:
- _self
- _top
- _blank
- _parent
- framename
Note: Items that have a defined href and target attribute set to _blank should not be selectable.
Typestring | undefined
Defaultundefined
Since1.19.0

design

DescriptionItem design.
Note: Items with "Action" design must not have sub-items.
Type"Default" | "Action"
Default"Default"
Since2.7.0

unselectable

DescriptionIndicates whether the navigation item is selectable. By default, all items are selectable unless specifically marked as unselectable.
When a parent item is marked as unselectable, selecting it will only expand or collapse its sub-items. To improve user experience do not mix unselectable parent items with selectable parent items in a single side navigation.
Guidelines:
- Items with an assigned href and a target of _blank should be marked as unselectable.
- Items that trigger actions (with design "Action") should be marked as unselectable.
Typeboolean
Defaultfalse
Since2.7.0

accessibilityAttributes

DescriptionDefines the additional accessibility attributes that will be applied to the component. The following fields are supported:
- hasPopup: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button. Accepts the following string values: dialog, grid, listbox, menu or tree.
Note: Do not use it on parent items, as it will be overridden if the item is in the overflow menu.
TypeSideNavigationItemAccessibilityAttributes
Default{}
Since2.7.0

text

DescriptionDefines the text of the item.
Typestring | undefined
Defaultundefined

disabled

DescriptionDefines whether the component is disabled. A disabled component can't be pressed or focused, and it is not in the tab chain.
Typeboolean
Defaultfalse
Since1.19.0

tooltip

DescriptionDefines the tooltip of the component.
A tooltip attribute should be provided, in order to represent meaning/function, when the component is collapsed ("icon only" design is visualized) or the item text is truncated.
Typestring | undefined
Defaultundefined
Since2.0.0

Slots

default

DescriptionDefines nested items by passing ui5-side-navigation-sub-item to the default slot.
TypeArray<SideNavigationSubItem>

Events

click

DescriptionFired when the component is activated either with a click/tap or by using the [Enter] or [Space] keys.
TypeCustomEvent<SideNavigationItemClickEventDetail>
ParametersaltKey: boolean
Returns whether the "ALT" key was pressed when the event was triggered.
ctrlKey: boolean
Returns whether the "CTRL" key was pressed when the event was triggered.
metaKey: boolean
Returns whether the "META" key was pressed when the event was triggered.
shiftKey: boolean
Returns whether the "SHIFT" key was pressed when the event was triggered.
BubblesYes
CancelableYes - via preventDefault()

Methods

No methods available for this component.

CSS Parts

No CSS parts available for this component.