src/behaviors/Visibility/Visibility.js
An example of Visibility.
Calculation | Value |
---|---|
direction | none |
pixelsPassed | 0px |
percentagePassed | 0% |
fits | false |
width | 0px |
height | 0px |
onScreen | false |
offScreen | false |
passing | false |
topVisible | false |
bottomVisible | false |
topPassed | false |
bottomPassed | false |
Fires callbacks immediately after mount.
Calculation | Value |
---|---|
direction | up |
pixelsPassed | 0px |
percentagePassed | 0% |
fits | false |
width | 950px |
height | 76px |
onScreen | false |
offScreen | true |
passing | false |
topVisible | false |
bottomVisible | false |
topPassed | false |
bottomPassed | false |
Value that context should be adjusted in pixels. Useful for making content appear below content fixed to the page.
Calculation | Value |
---|---|
topVisible | false |
bottomVisible | false |
topPassed | false |
bottomPassed | false |
You can change the callback frequency with `once` and `continuous` settings.
You can specify callbacks that occur after different percentages or pixels of an element are passed.
You can specify updateOn='repaint'
, it will allow to update and fire callbacks on browser repaint (animation frames).
Segment
Calculation | Value |
---|---|
topVisible | false |
bottomVisible | false |