InteractivityScroll Behavior

Scroll Behavior

Controls the scroll behavior of an element.

ClassStyle
sb-autoscroll-behavior: auto;
sb-sscroll-behavior: smooth;

Auto

Initial value

Allows the default scrolling behavior, which is immediate and without any animation.

<div class="sb-auto ..."></div>

Smooth

Enables a smooth scrolling effect, providing a gradual transition when scrolling to a different part of the page.

<div class="sb-s ..."></div>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Using media queries

You can combine responsive breakpoints like sm:sb-*, md:sb-*, lg:sb-*, and xxl:sb-* to allow targeting specific utilities in different viewports.

Using hover states

Alternatively, you can apply :hover by using h:sb-* utility to override elements and change their values when hovering over them.