Generate CSS scroll snap code instantly. Tweak snap type, alignment, and scroll behaviour with live demos, then copy as CSS or Tailwind. Compare mandatory vs proximity, then see how fullPage.js takes snapping further.
Tweak snap type, alignment, section height and scroll behaviour, then copy the generated HTML, CSS or Tailwind CSS code. No JavaScript needed.
Shrink to see Snap Align in action.
Off → scroll-snap-stop: always
On → scroll-behavior: smooth
Generate a horizontally snapping carousel with scroll-snap-type: x mandatory. Each item uses scroll-snap-align: start and flex-shrink: 0; width: 100%. Swipe or drag horizontally inside the demo, then copy the code.
Shrink to see Snap Align in action.
Off → scroll-snap-stop: always
On → scroll-behavior: smooth
These features aren't possible with CSS scroll snap, but they work out of the box with fullPage.js.
CSS scroll snap is controlled by three main properties: scroll-snap-type on the scroll container, scroll-snap-align on each snap target, and optionally scroll-snap-stop to prevent skipping.
/* Container */
.scroll-container {
height: 100vh;
overflow-y: scroll;
scroll-snap-type: y mandatory; /* or: y proximity */
}
/* Each snap target */
.section {
height: 100vh;
scroll-snap-align: start; /* or: center, end */
}
/* Prevent skipping sections (optional) */
.section {
scroll-snap-stop: always;
}
mandatory means the browser will always snap to a snap point after scrolling ends, regardless of where the scroll stopped. This creates a fullscreen-section feel; you can never rest between sections.
proximity means the browser only snaps if the final scroll position is close to a snap point (within about 50% of the snap target's size). The user can stop between sections if they scroll far enough from any snap point. Better for pages with long content.
scroll-snap-stop: always prevents the user from scrolling past a snap point in a single gesture, useful for step-by-step presentations where every section must be viewed.
CSS scroll snap handles the basic snapping behavior. fullPage.js builds on top of that with keyboard navigation, mobile swipe gestures, animated transitions between sections, anchor links, and more.
| Feature | CSS scroll-snap | fullPage.js |
|---|---|---|
| Section transition effects | No | 80+ CSS & WebGL effects |
| Scrolling speed control | No | Yes |
| Infinite scroll / looping | No | Yes |
| Snap delay | No | Yes |
| Keyboard navigation (↑↓ arrows) | No | Yes |
| Callbacks (afterLoad, onLeave) | No | Yes |
| Anchor links (#section2) | No | Yes |
| Browser history (back/forward) | No | Yes |
| Navigation dots / menu | No | Built-in |
| Responsive / disable at mobile | No | Yes |
| Touch / swipe support | Native only | Optimized + configurable |
| Horizontal slides within sections | Limited | Yes |
| Basic scroll snapping | Yes | Yes |
For simple snap-to-section layouts, CSS is sufficient. For interactive presentations, marketing pages, or sites that need section transitions and full navigation control, fullPage.js saves significant development time.
CSS scroll snap is fully supported in all modern browsers (97.5% global coverage). fullPage.js goes further, compiled with Babel targeting IE 11, it works on virtually any browser your visitors might use.
| Browser | CSS scroll-snap | fullPage.js |
|---|---|---|
| Chrome | 69+ | 26+ |
| Firefox | 68+ | 21+ |
| Safari | 11+ | 6.1+ |
| Edge | 79+ | All versions |
| Mobile Safari | 11+ | 7+ |
| Chrome Android | 69+ | 26+ |
| Internet Explorer | Partial (IE 10–11, -ms- prefix only) | 11+ |
scroll-snap-type on the container and scroll-snap-align on each snap target. After a scroll gesture ends, the browser snaps to the nearest valid snap point.height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; and each section: height: 100vh; scroll-snap-align: start;. This creates a basic fullscreen scroll. For keyboard navigation, anchor links, and animated transitions, use fullPage.js.Add scroll transitions, parallax and animations to your site with fullPage.js. One component, 80+ effects.
Powering fullscreen design for Google, Sony, BBC, eBay & more