To create a snappy or sticky scroll slider for portraits in Webflow, you’ll use horizontal scroll interaction with scroll snap behavior and sticky positioning. Here's how to build it:
1. Prepare Your Section and Wrapper
- Add a Section to your page and give it a class like "scroll-section".
- Inside the section, add a Div Block for the scroll container (e.g., "scroll-wrapper"). This will hold all the portrait slides.
- Set Overflow: Hidden for the section to prevent content spilling.
- Set the scroll-wrapper to:
- Display: Flex
- Flex Direction: Row
- Width: 100vw × number of slides (e.g., 500vw for 5 slides)
- Position: Sticky
- Top: 0
- Add a combo class to give the wrapper a fixed height (e.g., 100vh).
3. Add Portrait Slides
- Inside the scroll-wrapper, add multiple Div Blocks (e.g., "portrait-slide").
- Style each slide to:
- Width: 100vw
- Height: 100vh
- Scroll Snap Align: Start
- Use Background Image or Image Elements for the portraits.
- Optional: Use Flexbox (center/center) to align contents inside each slide.
- On the scroll-wrapper (not the slides), set:
- Overflow-X: Scroll
- Scroll Direction: Horizontal
- Scroll Snap Type: X mandatory (set this using custom CSS or embed style tag inside Webflow)
- Example:
scroll-wrapper
→ Custom Attribute: - Name:
style
- Value:
scroll-snap-type: x mandatory; overflow-y: hidden;
- Enable smooth scrolling to make the snap behavior feel slick.
- Add a custom embed inside the Webflow page
<style>
and target your scroll container: - Example:
scroll-wrapper { scroll-behavior: smooth; }
- Paste this into a Custom Code embed or Page Settings > Inside .
6. Add Interaction (Optional for Sticky Feel)
- Use Webflow’s Page Scroll interactions if you want to simulate sticky movement or animate elements as you scroll.
- Example: animate the portrait’s scale or opacity as each slide enters the viewport.
Summary
To create a snappy/sticky scroll slider, build a horizontally scrolling container using flexbox, enable scroll-snap via custom CSS, and use 100vw slides for each portrait. Add optional page scroll interactions for more polish and animation.