The scroll-snap-align property controls how snap targets align inside a scroll container when scrolling stops. It helps create predictable carousel, gallery, and panel snapping.
01
align
Snap position.
02
start
Leading edge.
03
center
Middle stop.
04
target
On child.
05
carousel
Slide snap.
06
type
With container.
Fundamentals
Introduction
The scroll-snap-align property in CSS is part of the CSS Scroll Snap Module. It specifies how a snap point aligns with the scroll container’s scrollport when scrolling ends.
By using this property, you can control whether each slide, card, or panel snaps to the start edge, center, or end edge of the visible scroll area.
Definition and Usage
Apply scroll-snap-align to snap targets inside a scroll container — such as carousel slides inside a wrapper that already has scroll-snap-type enabled.
Put scroll-snap-type: x mandatory; on the container and scroll-snap-align: start; on each slide. When scrolling stops, each slide lines up with the start of the scrollport.
Foundation
📝 Syntax
The syntax for the scroll-snap-align property is straightforward. It is applied to snap targets inside a scroll container.
syntax.css
element{scroll-snap-align:none|start|center|end;}
Basic Example
snap-target.css
.scroll-item{scroll-snap-align:start;}
Related Properties
scroll-snap-type — enables snapping on the scroll container
scroll-snap-stop — controls whether scrolling can skip snap positions
scroll-padding — insets the scrollport on the container
Defaults
🎯 Default Value
The default value of the scroll-snap-align property is none, which means no snapping alignment is applied to the element.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Default value
none
Common values
start, center, end
Works with
scroll-snap-type on the container
Accepted values
none, start, center, end
Set on
Snap targets inside scroll containers
Inherited
No
Animatable
No
Reference
💎 Property Values
Value
Example
Description
none
scroll-snap-align: none;
No snapping alignment is applied.
start
scroll-snap-align: start;
The element aligns with the start edge of the scroll container.
center
scroll-snap-align: center;
The element aligns with the center of the scroll container.
end
scroll-snap-align: end;
The element aligns with the end edge of the scroll container.
startcenterend
Context
When to Use scroll-snap-align
scroll-snap-align helps when snap targets need predictable landing positions:
Horizontal carousels — Snap each slide to the start, center, or end of the viewport.
Image galleries — Keep each photo aligned consistently when the user stops scrolling.
Vertical panel flows — Snap full-height sections in onboarding or story layouts.
Pagination-style scrollers — Make each card feel like a deliberate page stop.
Enable snapping on the container with scroll-snap-type first, then choose alignment on each snap target.
Preview
👀 Live Preview
Scroll sideways inside the box. Each panel uses scroll-snap-align: start.
Slide 1
Slide 2
When scrolling stops, each snap target aligns with the start edge of the scrollport.
Hands-On
Examples Gallery
Start with the reference horizontal carousel, compare center and end alignment, then try a vertical snap layout.
📜 Snap Target Alignment
Align snap targets inside a scroll container — matching the reference example.
Example 1 — Horizontal scroll snap with start alignment
In this example, we’ll create a horizontal scrolling container where each item snaps to the start when scrolling ends.
Each vertical panel snaps so its top edge aligns with the top of the scrollport.
How It Works
The same alignment values work vertically when the container uses scroll-snap-type: y mandatory.
Companion
scroll-snap-align in the family
scroll-snap-align works on snap targets inside a container that already has scroll-snap-type. Pair it with scroll-padding when fixed UI overlaps the scrollport.
The scroll container uses scroll-snap-type to turn on snapping along an axis.
Container
2
Targets choose alignment
Each snap target gets scroll-snap-align with start, center, or end.
Target
3
Scroll motion finishes
When scrolling stops, the browser snaps the nearest target into the chosen alignment position.
Snap
=
★
Predictable snap stops
Carousels and panel scrollers feel intentional instead of stopping halfway between items.
Compatibility
Browser Compatibility
The scroll-snap-align property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. However, it is always a good practice to test your website across different browsers to ensure compatibility.
✓ Scroll snap · Modern support
Reliable snap-align support
Current Chrome, Firefox, Safari, Edge, and Opera support scroll-snap-align on snap targets.
97%Modern browser support
Google Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox68+ · Desktop & Mobile
Full support
Apple Safari14.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · Modern versions
Full support
Testing tip
Test horizontal and vertical snap carousels on mobile browsers to confirm start, center, and end alignment feel natural.
scroll-snap-align property97% supported
Bottom line:scroll-snap-align is safe to use in modern projects for snap targets inside scroll containers.
Wrap Up
Conclusion
The scroll-snap-align property is a powerful tool for creating smooth and user-friendly scrolling experiences. By controlling the alignment of snap points, you can enhance navigation in carousels and panel scrollers.
Experiment with start, center, and end to see how each value changes the feel of your layout. Pair it with scroll-snap-type on the container for the full scroll snap effect.
Apply scroll-snap-align on snap targets, not the scroll container
Enable scroll-snap-type on the container first
Use start for paginated carousels and card rows
Use center for hero sliders and featured picks
Test snap behavior on touch devices
❌ Don’t
Expect snapping without scroll-snap-type on the container
Mix conflicting alignments unless the layout needs it
Forget scroll-padding when fixed headers overlap snapped content
Assume none will snap — it disables alignment on that target
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about scroll-snap-align
Use these points when aligning snap targets inside scroll containers.
5
Core concepts
★01
none Default
No snap alignment.
Default
⚙02
start / center / end
Three align modes.
Values
◉03
snap target
Set on children.
Scope
▦04
scroll-snap-type
Container first.
Pairing
▦05
carousels
Common use case.
Use case
🔄06
scroll-padding
Offset scrollport.
Companion
❓ Frequently Asked Questions
scroll-snap-align sets how a snap target aligns within its scroll container when scrolling stops. It controls whether the element snaps to the start, center, or end of the scrollport.
scroll-snap-type is set on the scroll container and enables snapping along an axis. scroll-snap-align is set on snap targets inside the container and chooses their alignment position.
The default value is none, meaning the element does not participate as a snap target unless you set start, center, or end.
Apply it to the elements that should snap, such as carousel slides, gallery cards, or vertical panels inside a container that already has scroll-snap-type enabled.
Use it when you want predictable snap positions in carousels, image galleries, onboarding screens, or any scroll container where each item should land at a consistent edge or center point.