ScrollToController
Purpose
Enable links to scroll to arbitrary elements using smooth-scroll.
Actions
Action | Purpose |
---|---|
scroll | Perform the scroll |
Targets
Target | Purpose | Default |
---|---|---|
- | - | - |
Classes
Class | Purpose | Default |
---|---|---|
- | - | - |
Values
See scrollIntoView documentation for possible values for behaviour
, block
, and inline
.
Note: If the user's browser does not support smooth scrolling, the browser will ignore these values and scroll using the browser default.
Value | Type | Description | Default |
---|---|---|---|
target | String | A CSS selector to the element you wish to scroll to | - |
behaviour | String | One of auto , smooth | auto |
block | String | One of center , end , nearest , start | start |
inline | String | One of center , end , nearest , start | nearest |
Events
Event | When | Dispatched on | event.detail |
---|---|---|---|
- | - | - | - |
Side Effects
None
How to Use
See Also
Scroll Container Controller Scroll To Top Controller Scroll To Bottom Controller Scroll Into Focus Controller