Directory

← Back

Scroll Target for Flow

ScrollTarget: Wrap things and make visible

Author

Contributors

Rating

ScrollTarget demo recording

Scroll Target for Flow

Vaadin 10+ Java integration of https://github.com/fluorumlabs/scroll-target

<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():

ScrollTarget target = new ScrollTarget(new Paragraph("..."));

...

target.ensureVisibility();

Methods

ScrollTarget.setTopOffset(<offset_in_pixels>);

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

ScrollTarget.ensureVisibility();

ScrollTarget.ensureVisibility(<delay_in_milliseconds>);

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

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2019-04-04
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 10+
Browser
Firefox
Opera
Safari
Google Chrome
iOS Browser
Internet Explorer
Microsoft Edge

Scroll Target for Flow - Vaadin Add-on Directory

ScrollTarget: Wrap things and make visible Scroll Target for Flow - Vaadin Add-on Directory
![ScrollTarget demo recording](https://raw.githubusercontent.com/fluorumlabs/scroll-target-for-flow/master/demo-recording.gif) # Scroll Target for Flow Vaadin 10+ Java integration of https://github.com/fluorumlabs/scroll-target <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()`: ```java ScrollTarget target = new ScrollTarget(new Paragraph("...")); ... target.ensureVisibility(); ``` ## Methods ```java ScrollTarget.setTopOffset(); ``` `setTopOffset` defines a space that should be reserved for fixed top menu when scrolling. Can be set via `top-offset` attribute. ```javascript ScrollTarget.ensureVisibility(); ScrollTarget.ensureVisibility(); ``` `ensureVisibility` scrolls to make the wrapped content visible. If optional `` is specified, scrolling will be delayed by specified amount of time.
Online