Basic example
Click on the links below to see the live example.
To achieve a Smooth Scroll effect, add the
data-te-smooth-scroll-init
attribute to your link.
Here it is #section-1
Hey there 👋 we want to make TW elements a community-driven project. It's open source and free, and we would like it to stay that way. If you enjoy it, help the project grow by sharing it with your peers. Every share counts, thank you!
Custom container
By adding data-te-container
attribute you can set container in
which you want smooth scroll.
Here it is #section-2
Custom offset
By adding data-te-offset
attribute you can set custom offset
from element.
Here it is #section-3
Custom duration
By adding data-te-duration
attribute you can set custom
duration of smooth scroll.
Here it is #section-4
Custom easing
By adding data-te-easing
you can set other scroll's motion
option.
Here it is #section-5
Container away from viewport
When you put container with overflow-scroll
class away from
viewport link firstly will scroll to this container then it will scroll
container.
Section to scroll is below:
Here it is #section-6