A TypeScript plugin for BetterScroll that provides enhanced mouse wheel scrolling capabilities with configurable speed, direction, easing, and boundary damping on PC platforms.
Overall
score
98%
Build a configurable scroll controller for an interactive image gallery that supports both locked and free scrolling behaviors.
Create a module that initializes two different scroll instances for a gallery interface:
The module should:
@generates
/**
* Configuration options for the gallery scroller
*/
interface ScrollerConfig {
/** The scroll mode: 'locked' for single-axis, 'free' for multi-axis */
mode: 'locked' | 'free';
/** The primary scroll direction for locked mode */
direction?: 'vertical' | 'horizontal';
}
/**
* Initialize a scroll instance with the specified configuration
*
* @param selector - CSS selector for the wrapper element
* @param config - Configuration options for scroll behavior
* @returns The initialized scroll instance
*/
export function initializeScroller(selector: string, config: ScrollerConfig): any;Provides core scrolling functionality with configurable direction locking and free scrolling support.
Install with Tessl CLI
npx tessl i tessl/npm-better-scroll--mouse-wheeldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10