Scroll Status
Angular Bootstrap 5 Scroll Status plugin
Scroll Status plugin creates progress bar indicating page or component scroll level.
Angular Scroll status for the latest Bootstrap 5. Creates a progress bar indicating page or component scroll level.Note: Read the API tab to find all available options and advanced customization
Basic example
The Scroll Status Service provides method to calculate scroll level of page or component.
Set #container
template variable on element of your choice and subscribe to getScrollPercentage(container)
to get scroll level in return. Set the .scroll-status-progress
element's [style.width.%]
attribute to the returned value from service in order to dynamically update scroll progress bar.
Some content here
Global example
The getScrollPercentage()
method by default calculates the scroll for window or document if function parameter is not provided.
Styling
Color
Easily change the color of Scroll Status with
.bg-*
color classes.
Some content here
Position
Change vertical of Scroll Status position by adding styling rule style="top: 10%"
to .scroll-status
element.
Some content here
Height
Change height of Scroll Status by adding styling rule style="height: 20px"
. to .scroll-status-progress
element
Some content here
Modal
To create modal you can follow our MDB Angular Modal documentation.
One-time modal
Some content here
Multiple modal
Some content here
Scroll status - API
Installation
To install and configure the plugin follow our Plugins Installation Guide. Please remember to update all the plugin names and import paths. You can find all the necessary information in the Import section.
Import
Methods
Name | Description | Example |
---|---|---|
getScrollPercentage(container) |
Get scrollPercentage observable of the given container | scrollStatusService.getScrollPercentage(this.container.nativeElement) |
getScrollPercentage() |
Get scrollPercentage observable of window/document | scrollStatusService.getScrollPercentage() |