@titelmedia/bricks-smooth-scroll
v2.7.0
Published
> TODO: description
Downloads
103
Maintainers
Keywords
Readme
bricks-smooth-scroll
Usage of wrapper
import ScrollProvider, {
SmoothScrollStyles,
} from '@titelmedia/bricks-smooth-scroll';
<SmoothScrollStyles />
<ScrollProvider>
// page content
</ScrollProvider>
Usage of context
restart: restart Loco. necessary if content changes height for example
initTl: init timelines inside content elements. sets to true when images and fonts have loaded... but i have to think about it a bit more, it's shaky.
scrollContainerId: use in ScrollTrigger for { scroller: document.querySelector(#${scrollContainerId}
)}
import { ScrollContext } from '@titelmedia/bricks-smooth-scroll';
const { scrollContainerId, initTl, restart } = useContext(ScrollContext);