Skip to main content
cngx-src documentation

CngxMenuItemIcon

Directivev0.1.0WCAG AA

projects/common/interactive/menu/menu-item-slot.directives.ts

Import#

import { CngxMenuItemIcon } from '@cngx/common/interactive'

Description#

Marker directive for the leading icon position inside a [cngxMenuItem]. Applies cngx-menu-item__icon to the host element and defaults the host to aria-hidden="true" - the slot is decorative, the item's accessible name comes from the projected label. Consumers needing a screen-reader label on the icon override the default with [attr.aria-hidden]="null".

https://cngxjs.github.io/cngx/examples/#/common/interactive/menu/base/action-menu-with-separator

Metadata#

Host#