Offset
This behavior keeps offset elements synchronized with the live size of the header and sidenav.
Offset elements are used as spacing references for layouts, navigation systems, and menu structures that need to account for fixed or persistent UI areas. Instead of manually setting spacing values, the offset elements use the current width and height of their matching source element as minimum dimensions.
The header-offset elements copy the live width and height of the header and apply them as min-width and min-height.
The sidenav-offset elements copy the live width and height of the sidenav and apply them as min-width and min-height.
This helps related elements stay aligned when the header or sidenav changes size across breakpoints, responsive states, interactions, or dynamic content updates.
The behavior updates on page load, resize, orientation change, content changes, class changes, style changes, hidden-state changes, and live element size changes. This keeps the offsets accurate even when the layout changes after the page has already loaded.
Use this behavior when a layout, menu, or spacing element needs to reserve at least the same space as the header or sidenav without relying on fixed values.
Mega Menu Close Sync
This behavior keeps the navbar and sidenav mega menu close elements synchronized with the open state of their matching mega menus.
The mega-menu-close-navbar and mega-menu-close-sidenav elements are hidden by default. When a matching mega menu is open, the correct close element is shown as flex. When no matching mega menu is open, the close element is hidden again.
The behavior checks each mega-menu for open states, aria-expanded states, and visible navigation panels. This allows the close element to stay accurate even when the menu state is controlled by Interactions (X), dropdown behavior, keyboard actions, or responsive layout changes.
The navbar close element responds to mega menus that contain mega-menu-navigation-navbar.
The sidenav close element responds to mega menus that contain mega-menu-navigation-sidenav.
The behavior updates after clicks, mouse actions, touch actions, keyboard actions, resize events, and class, style, or aria-expanded changes.
Use this behavior when a shared close element needs to appear only while a navbar or sidenav mega menu is open.