Smooth scroll utility component
This enables smooth scrolling when a user clicks on anchor links or other in-page scrolling is triggered.
This is an opt-in behaviour that is activated by putting the
vf-smooth-scroll class on a parent element — a good place would be at
<html class="vf-smooth-scroll"> (note: it probably won't work if you add it your
Not that as of November 2021, CSS-based smooth scrolling is still not support by Safari on Mac OS or iOS.
This component targets WCAG 2.1 AA accessibility.
Generally this improves accessibility by smooth scrolling between content, for some scenarios the behaviour may become distracting.
Note that smooth scrolling is disabled if a user has flagged
You can also read about the Visual Framework's approach to accessibility.
This repository is distributed with [npm][https://www.npmjs.com/]. After [installing npm][https://www.npmjs.com/get-npm] and yarn, you can install
vf-smooth-scroll with this command.
$ yarn add --dev @visual-framework/vf-smooth-scroll
The style files included are written in Sass. If you're using a VF-core project, you can import it like this:
Make sure you import Sass requirements along with the modules. You can use a project boilerplate or the