Skip to main content
cngx-src documentation

createSliderInteraction

Functioncommon/interactive/sliderv0.1.0

projects/common/interactive/slider/slider-interaction.ts

Description#

Pure factory for a slider's keyboard + pointer-drag behaviour - the shared interaction brain for both CngxSlider (single) and each CngxSliderThumb (range). Arrow / Page / Home / End map onto the core's step helpers; pointer-down captures the pointer and drags via the supplied fractionFromPointer. Keeping this in one factory means the track and the thumb cannot drift apart.

Signature#

createSliderInteraction(options: CngxSliderInteractionOptions)

Parameters#

Returns#

CngxSliderInteraction