Skip to main content
cngx-src documentation

withTocScrollBehavior

Functionui/tocv0.1.0

projects/ui/toc/config/features.ts

Description#

Set the app-wide default scroll behaviour used when a link is activated. 'smooth' by default; the organism still swaps to 'auto' at runtime whenever prefers-reduced-motion: reduce matches, so this only chooses the motion-allowed behaviour.

provideTocConfig(withTocScrollBehavior('auto'));

Signature#

withTocScrollBehavior(scrollBehavior: NonNullable)

Parameters#

@paramscrollBehaviorNonNullable

Returns#

CngxTocConfigFeature