Skip to main content
cngx-src documentation

createStepperDisplayMode

Functioncommon/stepper

projects/common/stepper/display-mode.ts

Description#

Resolves the active stepper display mode by combining the collapse signal

  • whether the stepper's own container is narrow - with the configured mobileCollapse policy. 'classic' keeps the full strip; 'text' / 'dots' swap to the matching compact variant, 'off' stays classic at any width.

The factory takes no DOM API and holds no threshold: where the collapse happens is a @container rule in the stepper stylesheet, what it collapses into is this policy. See core-concepts/responsive-by-default.md.

Signature#

createStepperDisplayMode(collapsed: Signal, mobileCollapse)

Parameters#

@paramcollapsedSignal

true while the container sits below the collapse rung.

@parammobileCollapse

The configured collapse policy, read lazily.

Returns#

Signal<"classic" | "text" | "dots">