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 shortcut behaviour knob.
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); shortcut is a flat top-level scalar.
The cascaded keys are the dimension inputs, the mini hover dwell, the
shortcut default, 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. The docking threshold behind mode="auto"
is deliberately not here: it lives in sidenav-layout.css as a
@container rule, so a consumer moves it by overriding that rule.
Index#
Properties
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(...).
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.