Directory

scroll-target - Vaadin Add-on Directory

: Wrap things and make visible scroll-target - Vaadin Add-on Directory
**[ This description is mirrored from README.md at [github.com/fluorumlabs/scroll-target](https://github.com//fluorumlabs/scroll-target/blob/v1.0.0/README.md) on 2019-05-10 ]** # <scroll-target> [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()`: ```html ...

I'm the content you want to see

...

``` ## Properties ```html ``` `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(...)`. ## Methods ```javascript scrollTargetElement.setTopOffset(); ``` `setTopOffset` defines a space that should be reserved for fixed top menu when scrolling. Can be set via `top-offset` attribute. ```javascript scrollTargetElement.ensureVisibility(); ``` `ensureVisibility` scrolls to make the wrapped content visible. If optional `` is specified, scrolling will be delayed by specified amount of time.