Navigation Menu Item
<gstock-navigation-menu-item>
|
GstockNavigationMenuItem
API
Properties
| Name | Description | Reflects | Type | Default |
|---|---|---|---|---|
autoclose
|
Automatically closes the navigation menu when an item is selected. |
|
boolean
|
true
|
expanded
|
Expands the navigation item. |
|
boolean
|
false
|
selected
|
Draws the navigation item in a selected state. |
|
boolean
|
false
|
disabled
|
Disables the navigation item. |
|
boolean
|
false
|
download
|
Tells the browser to download the linked file as this filename. Only used
when href is present.
|
string | undefined
|
-
|
|
href
|
When set, the underlying button will be rendered as an
<a> with this href instead of a
<button>.
|
string
|
''
|
|
icon
|
The icon name. |
string | undefined
|
-
|
|
rel
|
When using href, this attribute will map to the underlying
link’s rel attribute. Unlike regular links, the default is
noreferrer noopener to prevent security exploits. However, if
you’re using target to point to a specific tab/window, this
will prevent that from working correctly. You can remove or change the
default value by setting the attribute to an empty string or a value of
your choice, respectively.
|
string
|
'noreferrer noopener'
|
|
target
|
Tells the browser where to open the link. Only used when
href is present.
|
'_blank' | '_parent' | '_self' | '_top'
|
-
|
|
updateComplete
|
A read-only promise that resolves when the component has finished updating. |
Learn more about attributes and properties .
Events
| Name | React Event | Description | Event Detail |
|---|---|---|---|
gstock-expand-event
|
onGstockExpandEvent
|
Emitted when the navigation menu item expands. | - |
gstock-after-expand-event
|
onGstockAfterExpandEvent
|
Emitted after the navigation menu item expands and all animations are complete. | - |
gstock-collapse-event
|
onGstockCollapseEvent
|
Emitted when the navigation menu item collapses. | - |
gstock-after-collapse-event
|
onGstockAfterCollapseEvent
|
Emitted after the navigation menu item collapses and all animations are complete. | - |
Learn more about events .
Slots
| Name | Description |
|---|---|
default
|
The default slot. |
expand-icon
|
The icon to show when the navigation menu item is expanded. |
collapse-icon
|
The icon to show when the navigation menu item is collapsed. |
Learn more about slots .
Methods
| Name | Description |
|---|---|
isLink( )
|
Returns true if the item is a link. |
getChildrenItems(
|
Gets all the nested navigation items in this node. |
Learn more about methods .
CSS Parts
| Name | Description |
|---|---|
base
|
The component’s base wrapper. |
item
|
The navigation menu item’s container. This element wraps everything except slotted navigation menu item children. |
item--disabled
|
Applied when the navigation menu item is disabled. |
item--expanded
|
Applied when the navigation menu item is expanded. |
item--selected
|
Applied when the navigation menu item is selected. |
indentation
|
The navigation menu item’s indentation container. |
icon
|
The container that wraps the icon item’s. |
expand-icon
|
The container that wraps the navigation menu item’s expand icon. |
label
|
The navigation menu item’s label. |
children
|
The container that wraps the navigation menu item’s nested children. |
Learn more about CSS parts .
Dependencies
This component automatically imports the following dependencies.