1. guides
  2. Cookbook
  3. scroll containers

Scroll Containers

Create scrolling containers using the scroll snap features from Tailwind.

Scroll Snap

Implements Tailwind’s Scroll Snap Alignment utility classes.

1
2
3
4
5
6
7
8

Carousels

Using Scroll Containers, we can create a fully functional carousel, complete with thumbnail selection.

full-0full-1full-2full-3full-4full-5

Multi-Column

Using Scroll Containers, we can scroll sets of items.

The FlashGuardians of the Galaxy Vol. 3Black Panther: Wakanda ForeverAvengers: Infinity WarSpider-Man: No Way HomeThe BatmanIron ManVenom: Let There Be CarnageDeadpool

Images courtesy of The Movie Database

API Reference

Learn more about Tailwind’s utility classes for scroll behavior and scroll snap.

FeatureDescription
scroll-behavior Controls the scroll behavior of an element.
scroll-margin Controls the scroll offset around items in a snap container.
scroll-padding Controls an element’s scroll offset within a snap container.
scroll-snap-align Controls the scroll snap alignment of an element.
scroll-snap-stop Controls whether you can skip past possible snap positions.
scroll-snap-type Controls how strictly snap points are enforced in a snap container.
View page on GitHub