Scroll Status
Bootstrap 5 Scroll Status plugin
Scroll Status plugin contains MDBScrollProgress
component for visual representation of the scroll progress and v-mdb-scroll-status
directive for calculating current scroll value on element.
Note: Read the API tab to find all available options and advanced customization
Basic example
Create default Scroll Status with MDBScrollProgress
. Pass progress
property with the value calculated by v-mdb-scroll-status
directive.
Some content here
Global example
Create element indicating global page scroll level.
Styling
Color
Change default color of MDBScrollProgress
> with
color
property.
Some content here
Position
Change default vertical position of MDBScrollProgress
with
offset
.
Some content here
Height
Change default height of MDBScrollProgress
with
height
.
Some content here
Modal
One-time modal
Once show modal with once
and scrollCallback
arguments after reaching value set in
scroll
of v-mdb-scroll-status
Some content here
Multiple modal
To show modal more than just one time, simply use only scroll
and scrollCalback
.
Some content here
Scroll Status - API
Import
Properties
MDBScrollProgress
Name | Type | Default | Description |
---|---|---|---|
color
|
String | #1266F1 |
Defines color of the progress bar. |
height |
String | 10px |
Defines height of the progress bar. |
offset |
Number | 0 |
Defines offset of the progress bar. |
progress |
Number | 0 |
Pass scroll progress based on v-mdb-scroll-status directive.
|
Arguments
v-mdb-scroll-status
Name | Type | Default | Description |
---|---|---|---|
callback
|
Function |
|
Function that will be called on every scroll status update event. Use it to update your progress status. |
global
|
Boolean | false |
If value is true, it will show global scroll (window scroll). |
scroll
|
Number | 0 |
Defines value which crossing will trigger scrollCallback .
|
scrollCallback
|
Function |
|
Function that will be called when scroll value is reached. Use it for e.g. opening modals.
|
once
|
Boolean | true |
If value is true, it will call scrollCallback only once.
|