@smoovy/scroller-shareddeprecated

Scroller shared components

Usage no npm install needed!

<script type="module">
  import smoovyScrollerShared from 'https://cdn.skypack.dev/@smoovy/scroller-shared';
</script>

README

@smoovy/scroller-shared

Version Size

Some base components for a basic scroller.

Installation

npm install --save @smoovy/scroller-shared

Usage

Choose the component you want to add to your scroller module and simply include it. E.g.:

import { MouseWheelInput } from '@smoovy/scroller-shared';

Inputs

| Class | Config key | Options | - | - | - | | MouseWheelInput | mouseWheel | target: HTMLElement
multiplier: number
multiplierFirefox: number | TouchSwipeInput | touchSwipe | target: HTMLElement
multiplier: number

Transformers

| Class | Config key | Options | - | - | - | | ClampTransformer | clamp | -

Outputs

| Class | Config key | Options | - | - | - | | CssTransformOutput | cssTransform | sectionSelector: string
sectionPadding: number
firefoxFix: boolean

Modularity

To reduce the final bundle size even more, you can only import the components you're really using. E.g.:

import { MouseWheelInput } from '@smoovy/scroller-shared/m/inputs/mouse-wheel-input';

Development commands

// Serve with parcel
npm run serve

// Build with rollup
npm run build

// Run Jest unit tests
npm run test

// Run TSLinter
npm run lint

License

See the LICENSE file for license rights and limitations (MIT).