surstromming
v1.0.1
Published
Smelly fish, and also a slider thing
Downloads
5
Readme
surstromming
import { surstromming } from 'surstromming'
const instance = surstromming('.element', {
// at what breakpoint is changes mode
modeChangeBreakpoint = 768,
// selector of the items inside the container
itemSelector = ".item",
// how fast the mouse moves the items
speed = 0.05,
// runs in init
onInit = ({ element, list, items }) => {},
// runs each frame in 'mouse' mode
onFrame = () => {},
// what a new item becomes active
onChange = (oldActive, newActive) => {},
// on window resize between big/small
onModeChange = (bigMode) => {},
});
// destroy/remove event listeners
instance.destroy()