CngxSidenavConfig
projects/ui/sidenav/config/sidenav.config.ts
Import#
import { CngxSidenavConfig } from '@cngx/ui/sidenav'
Description#
App-wide cascade for the sidenav family's dimension defaults, the mini
expand-on-hover dwell, and the responsive / shortcut behaviour knobs.
Resolution priority (high -> low):
- Per-instance Input binding (e.g.
[width]="'320px'",[shortcut]="'mod+b'"). provideSidenavConfigAt(...)in a parent component'sviewProviders(component-scoped override).provideSidenavConfig(...)at the application root.- Library defaults (merged in via
CNGX_SIDENAV_DEFAULTS).
Every key is optional - partial overrides deep-merge with the library
defaults, so consumers declare only the keys they want to override. The
dimensions, hover, and routerSync sub-trees are one level deep
(spread-merged per key); responsive and shortcut are flat top-level
scalars.
The cascaded keys are the dimension inputs, the mini hover dwell, the
responsive and shortcut defaults, and the router-sync param.
ariaLabel, position, and mode stay per-instance only, since they
describe an individual rail rather than an app-wide default.
Index#
Instance Properties#
literal typePanel dimensions. Per-instance [width] / [miniWidth] / [minWidth] /
[maxWidth] bindings still win; this only moves the cascade defaults. A
one-level nested sub-tree (spread-merged per key in the config reducer).
literal typeMini expand-on-hover dwell, forwarded to the composed CngxHoverIntent
hostDirective. A one-level nested sub-tree. Wired via
withSidenavHoverDwell(...).
Default CSS media-query string for responsive mode switching. Per-instance
[responsive] still wins. A flat top-level scalar, not a nested sub-tree.
literal typeURL query-param sync defaults for [cngxSidenavRouterSync]. A one-level
nested sub-tree (spread-merged per key in the config reducer). Wired via
withSidenavRouterSync(...); the directive resolves param as
[param] ?? routerSync.param ?? 'nav', so an un-configured consumer keeps
the 'nav' literal.