: Wrap things and make visible

[ This description is mirrored from README.md at github.com/fluorumlabs/scroll-target on 2019-05-10 ]


Live Demo ↗

<scroll-target> is a really simple web component for making scrolling easier. ll you need to do is to wrap the content you want to scroll to and call ensureVisibility():

<button onclick="document.getElementById('target').ensureVisibility()">Click me!</button>


<scroll-target id="target">
    <h2>I'm the content you want to see</h2>


<scroll-target top-offset="<offset-in-pixels>">

top-offset defines a space that should be reserved for fixed top menu when scrolling. 0 by default. Can be changed in runtime by calling scrollTargetElement.setTopOffset(...).



setTopOffset defines a space that should be reserved for fixed top menu when scrolling. Can be set via top-offset attribute.


ensureVisibility scrolls to make the wrapped content visible. If optional <delay-in-milliseconds> is specified, scrolling will be delayed by specified amount of time.


Link to this version
ImportedReleased 04 April 2019Apache License 2.0
Framework Support
Polymer 1.0+
Polymer 2.0+
Browser Compatibility
Install with
bower install --save fluorumlabs/scroll-target"#1.0.0"
Run the above Bower command in your project folder. If you have any issues installing, please contact the author.
Release notes - Version 1.0.0


  • smoothscroll#^0.3.6