Skip to main content

Scroll Snap Type

Utilities for controlling how strictly snap points are enforced.

CSS Property:scroll-snap-type
Classes:6

Scroll Snap Type Classes

ClassCSS
snap-nonescroll-snap-type: none;
snap-xscroll-snap-type: x var(--tw-scroll-snap-strictness);
snap-yscroll-snap-type: y var(--tw-scroll-snap-strictness);
snap-bothscroll-snap-type: both var(--tw-scroll-snap-strictness);
snap-mandatory--tw-scroll-snap-strictness: mandatory;
snap-proximity--tw-scroll-snap-strictness: proximity;

Arbitrary Values

You can use arbitrary values with square bracket notation when you need a specific value not included in the default scale.

[scroll-snap-type:value]

Responsive Variants

Apply scroll snap type utilities at specific breakpoints using responsive prefixes.

BreakpointPrefixExample
640px+sm:sm:snap-none
768px+md:md:snap-none
1024px+lg:lg:snap-none
1280px+xl:xl:snap-none
1536px+2xl:2xl:snap-none