To create a snappy/sticky scroll slider for portraits in Webflow, you’ll use horizontal scrolling triggered by vertical scroll, combined with section snapping and sticky positioning.
1. Set Up Overall Page Structure
- Create a main Section (e.g., “Portraits Section”) that will hold your horizontal scroll content.
- Give the section a class (e.g.,
.horizontal-scroll-wrapper
) and set its height to 100vh. - Inside it, add a Div Block (e.g.,
.scroll-container
) that will contain all your portrait slides.
- Set the
.scroll-container
to position: sticky and top: 0. - Set its height to 100vh and display: flex (horizontal layout).
- Each child of this container (your “slides” or portraits) should also be a Div Block with width: 100vw and height: 100vh so they appear full screen.
- On the overall
.horizontal-scroll-wrapper
, set overflow: hidden
. - Create a Scroll-based Animation (via Webflow Interactions):
- Set trigger to While scrolling in view.
- Apply it to the
.scroll-container
. - At 0% scroll, set
transform: translateX(0%)
. - At 100% scroll, set
transform: translateX(-300%)
for 4 slides, -100% per slide after the first.
- The
.horizontal-scroll-wrapper
section must be tall enough to allow vertical scroll. - For 4 portrait slides, set the wrapper height to:
*_100vh _ number of slides** (i.e., 400vh for 4 portraits). - Do this in the Height setting of the section or using a combo of padding/margin if needed for responsiveness.
- Webflow doesn’t have native scroll snap, but you can add it via custom code in the page settings:
- Add
scroll-snap-type: x mandatory
to the .scroll-container
. - Add
scroll-snap-align: start
to each portrait slide. - If you're using smooth horizontal scroll (with interactions), manual snap may not be necessary as controlled animation gives that "snappy" feel.
6. Test Responsiveness
- Ensure that each slide's content (the portraits) scales well across mobile and tablet.
- Use
object-fit: cover
on images where necessary to maintain image fill.
Summary
To create a snappy/sticky portrait slider in Webflow, build a sticky horizontal scroll section, animate it with scroll-based interactions, and use full-screen slides for each portrait. Control scroll speed and snap behavior for a polished experience.