@furman1331/page-scroller
Version:
Amazing plugin for creating smooth scroll on your website
32 lines (24 loc) • 884 B
text/typescript
import type { TScrollingMode, TScrollingDirectionVertically } from '@/types/scroll'
export interface ISectionChangeProps {
beforeIndex: number
afterIndex: number
}
export type ISectionBeforeChangeProps = ISectionChangeProps
export interface IPageScrollerOptions {
isDebug?: boolean
isWheelEnabled?: boolean
isKeyboardEnabled?: boolean
isTouchEnabled?: boolean
scrollingSpeed?: number
scrollMode?: TScrollingMode
transitionTimingFunction?: string
slidesIdentifyAttribute?: string
isAllowToScrollThroughSlides?: boolean
onSectionChange?: (props: ISectionChangeProps) => unknown
onBeforeSectionChange?: (props: ISectionBeforeChangeProps) => unknown
}
export interface IPageScrollerReturn {
initPageScroller(selector: string): void
changeSectionBySpecificIndex: (index: number) => void
changeSectionByDirection: (direction: TScrollingDirectionVertically) => void
}