Skip to main content

Navigation Drawer Menu Item

<gstock-navigation-drawer-menu-item> | GstockNavigationDrawerMenuItem

API

Propiedades

Nombre Descripción Reflects Tipo Por defecto
autoclose Automatically closes the navigation menu when an item is selected. Reflects boolean true
expanded Expands the navigation item. Reflects boolean false
selected Draws the navigation item in a selected state. Reflects boolean false
disabled Disables the navigation item. Reflects 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 <div>. 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.

Aprende más sobre atributos y propiedades .

Eventos

Nombre React Event Descripción 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. -

Aprende más sobre eventos .

Slots

Nombre Descripción
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.

Aprende más sobre slots .

Métodos

Nombre Descripción
isLink( ) Returns true if the item is a link.
getChildrenItems(
{ includeDisabled = true, }: { includeDisabled?: boolean }
)
Gets all the nested navigation items in this node.

Aprende más sobre métodos .

Partes

Nombre Descripción
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.

Aprende más sobre partes CSS .

Dependencias

Este componente importa automáticamente las siguientes dependencias.