Scroll To

Use the scroll-to module to smoothly scroll to elements on the page.

To make sure that any sticky elements like site headers don't cover up your scroll target, tag them with the class js-is-fixed-top.

One day, we may be able to achieve this with pure CSS. But we're still waiting on better browser support, so for now we must use JavaScript.

Examples

Basic

Welcome to #section-1

Custom Scroll Speed

Welcome to #section-2. It should have taken you a little longer to get here.

Custom Offset

Welcome to #section-3. You should notice a 30px offset above me.