spz-scrollbar
When to use
spz-scrollbar provides a custom scroll progress indicator with step-based navigation for any scrollable container. It exposes template data (progress, step, etc.) for flexible UI rendering.
Supported layout
container
Example
Attributes
Template data
The component provides the following data to its child template:
Actions
next
Scroll to the next step position.
prev
Scroll to the previous step position.
scrollToTarget
Scroll the container so that a specific target element is visible.
Parameters:
srcortarget(string): CSS selector of the element to scroll to
Example:
Behavior
- If the container element itself does not scroll (content fits), the component falls back to observing body scroll within the container's viewport region.
- The component automatically recalculates when the container is resized (via ResizeObserver).
Notes
- This component does not emit custom events.