foundation-header.navigation.layoutitemcheck
Home > @genesislcap/foundation-header > Navigation > layoutItemCheck
Navigation.layoutItemCheck property
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Callback function to check if a layout item is currently active in the layout. Used with nav items that have isLayoutItem: true and layoutRegistration set.
Signature:
layoutItemCheck?: (registration: string) => boolean;
Remarks
When provided, this callback is called for each layout nav item to determine if it should be styled as "active" (added to layout) or "inactive" (not in layout).
Example
<foundation-header
:layoutItemCheck=${(registration) => currentLayoutItems.includes(registration)}
/>