LayerwiseLayerwise
  • Features
  • Pricing
  • Templates
  • Docs
DownloadDownload
FeaturesPricingTemplatesDocsAI Website BuilderVibe CodingPersonal Software
DownloadDownload
  1. Glossary
  2. /
  3. Scroll effects

Horizontal scroll section

Also called horizontal scrolling section or sideways scroll

A pinned section where scrolling down moves a row of cards sideways, turning vertical scrolling into horizontal movement.

import { useRef } from 'react';
import { motion, useScroll, useTransform } from 'motion/react';

const caseStudies = [
  { name: 'Northwind', result: 'Cut checkout time by 38%' },
  { name: 'Fieldnote', result: 'Shipped a mobile app in two weeks' },
  { name: 'Harbor', result: 'Moved 12 internal tools online' },
  { name: 'Parcel', result: 'Doubled weekly signups' },
  { name: 'Lumen', result: 'Replaced six spreadsheets with one app' }
];

export function CaseStudyScroller() {
  const track = useRef<HTMLDivElement>(null);
  const { scrollYProgress } = useScroll({
    target: track,
    offset: ['start start', 'end end']
  });
  // Slide the row left by its overflow: its own width (100%) minus the viewport's.
  const x = useTransform(
    scrollYProgress,
    (p) => `calc(${-p} * (100% - 100vw))`
  );

  // Tabbing to an off-screen card scrolls the page to the point where it's in view.
  function reveal(index: number) {
    const { top, height } = track.current!.getBoundingClientRect();
    const progress = index / (caseStudies.length - 1);
    window.scrollTo({ top: scrollY + top + progress * (height - innerHeight) });
  }

  return (
    // About as tall as the row is wide, so the row moves at a natural scrolling speed.
    <div ref={track} className='relative h-[300vh]'>
      <div className='sticky top-0 flex h-screen flex-col justify-center gap-8 overflow-clip'>
        <motion.ul style={{ x }} className='flex w-max gap-6 px-6'>
          {caseStudies.map((study, index) => (
            <li key={study.name}>
              <a
                href={`/customers/${study.name.toLowerCase()}`}
                onFocus={(event) =>
                  event.currentTarget.matches(':focus-visible') && reveal(index)
                }
                className='flex h-80 w-90 flex-col justify-end gap-1 rounded-3xl bg-muted p-6'
              >
                <span className='text-muted-foreground'>{study.name}</span>
                <span className='text-xl font-semibold'>{study.result}</span>
              </a>
            </li>
          ))}
        </motion.ul>
        <motion.div
          aria-hidden='true'
          style={{ scaleX: scrollYProgress }}
          className='mx-6 h-1 origin-left rounded-full bg-foreground'
        />
      </div>
    </div>
  );
}
Turn the case studies into a horizontal scroll section: wrap them in a container about 300vh tall, pin an inner panel with position: sticky; top: 0; height: 100vh, and translate the row of 360px cards from 0 to -(row width - viewport width) as the reader scrolls through the wrapper. Show a thin progress bar under the cards, keep the cards in Tab order, and fall back to a swipeable row with scroll-snap on screens under 768px.

Paste into Layerwise or any AI coding tool.

What is Horizontal scroll section?

In a horizontal scroll section, the page pins a wide row of content and slides it left as the reader scrolls down. A timeline, a set of case studies, or a product lineup moves past as if the page turned a corner, then normal vertical scrolling resumes at the end.

It is built like scroll pinning: a tall wrapper, a sticky child one screen tall, and a row inside it that moves with translateX from 0 to minus its overflow width as scroll progress goes from 0 to 1. Make the wrapper roughly as tall as the row is wide so the movement keeps a natural scrolling speed.

Readers can’t tell that more content waits off to the side, so let the next card peek in and show a progress indicator. Keyboard and screen reader users still need to reach every card in order, and on phones a swipeable row with scroll-snap is often the simpler choice.

Often confused with

Carousel
A carousel moves sideways when you swipe or press its arrows. A horizontal scroll section moves sideways as you scroll down the page.

Related terms

All terms

Scroll pinning

A scroll effect that holds a section in place while its content animates through several states, then releases it to scroll away.

Carousel

A row of slides shown one at a time and moved with arrows, dots, swipes, or a timer, to fit several images or cards in one spot.

Scroll snap

A CSS feature that makes a scroll container settle on set points, so carousels and full-screen sections come to rest neatly on an item.

Marquee

A strip of logos or text that scrolls sideways in an endless loop, often used for "trusted by" rows and announcements.

Build it with Layerwise

Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.

DownloadDownloadRead the docs
LayerwiseLayerwise

Build full-stack web apps in minutes with AI.

Product

  • Features
  • Pricing
  • Download
  • Templates

Solutions

  • AI Website Builder
  • Vibe Coding
  • Personal Software

Resources

  • Documentation
  • Changelog
  • Blog
  • Vibe Coding Glossary
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact

Legal

  • Privacy
  • Analytics Privacy
  • Terms
  • Security
  • Abuse

© 2026 Layerwise. All rights reserved.

Entrances & exits

  • Fade in
  • Slide in
  • Scale in
  • Pop in
  • Blur in
  • Reveal animation
  • Enter and exit animations

Timing & sequencing

  • Duration
  • Delay
  • Keyframes
  • Tweening
  • Stagger
  • Orchestration
  • Fill mode
  • Stepped animation
  • Looping animation
  • Yoyo animation

Easing

  • Easing
  • Linear easing
  • Ease-in
  • Ease-out
  • Ease-in-out
  • Cubic-bezier
  • Asymmetric easing
  • Overshoot easing

Springs & physics

  • Spring animation
  • Stiffness
  • Damping
  • Mass
  • Bounce
  • Velocity
  • Momentum
  • Interruptible animation
  • Rubber-banding

Transforms

  • Translate
  • Scale
  • Rotate
  • Skew
  • 3D flip
  • Perspective
  • Transform origin
  • Origin-aware animation

State transitions

  • Crossfade
  • Morph
  • Shared element transition
  • Layout animation
  • Height auto animation
  • Direction-aware transition
  • Continuity transition
  • Page transition
  • View Transitions API

Scroll effects

  • Scroll reveal
  • Scroll-driven animation
  • Parallax scrolling
  • Scrollytelling
  • Scroll pinning
  • Horizontal scroll section
  • Scroll progress bar
  • Scroll snap
  • Smooth scrolling

Interaction feedback

  • Hover effect
  • Press feedback
  • Ripple effect
  • Shake animation
  • Hold to confirm
  • Drag gesture
  • Drag to reorder
  • Swipe to dismiss
  • Pull to refresh
  • Magnetic button
  • Custom cursor
  • 3D tilt card
  • Spotlight card

Text effects

  • Typewriter effect
  • Text scramble
  • Split text animation
  • Text morph
  • Rotating words
  • Gradient text
  • Shimmer text
  • Number ticker
  • Tabular numbers
  • Underline animation

Loops & ambient motion

  • Marquee
  • Pulse animation
  • Float animation
  • Orbit animation
  • Idle animation
  • Particle background
  • Border beam
  • Confetti
  • Animated gradient

Visual effects

  • Blur
  • Clip-path
  • Mask
  • Before/after slider
  • SVG line drawing
  • Lottie animation

Motion principles

  • Purposeful animation
  • Anticipation
  • Follow-through
  • Squash and stretch
  • Perceived performance
  • Frequency of use
  • Spatial consistency
  • Reduced motion

Animation performance

  • Frame rate (FPS)
  • Jank
  • GPU acceleration
  • will-change
  • Layout thrashing

Layout

  • Hero section
  • Above the fold
  • Sticky header
  • Sidebar
  • Bento grid
  • Card
  • Flexbox
  • CSS Grid
  • Padding vs margin
  • Responsive design
  • Container
  • Masonry layout
  • Split screen
  • Z-index
  • Overflow

Components

  • Button variants
  • Modal
  • Drawer
  • Popover
  • Tooltip
  • Dropdown menu
  • Context menu
  • Toast notification
  • Tabs
  • Segmented control
  • Accordion
  • Carousel
  • Command palette
  • Combobox
  • Toggle switch
  • Checkbox
  • Radio button
  • Date picker
  • Breadcrumb
  • Pagination
  • Infinite scroll
  • Badge
  • Avatar stack
  • Empty state
  • Skeleton screen
  • Spinner
  • Progress bar
  • Data table
  • Stepper
  • Floating label
  • Inline validation
  • Alert banner
  • Tag input

States & patterns

  • Interaction states
  • Focus ring
  • Loading state
  • Optimistic UI
  • Debounce
  • Lazy loading
  • Dark mode
  • Micro-interaction
  • Affordance
  • Undo
  • Drag and drop
  • Keyboard shortcut

Visual styles

  • Glassmorphism
  • Liquid glass
  • Neumorphism
  • Claymorphism
  • Neo-brutalism
  • Skeuomorphism
  • Flat design
  • Mesh gradient
  • Aurora background
  • Grain texture
  • Glow effect
  • Drop shadow
  • Border radius
  • Grid background
  • Typographic hierarchy
  • Accent color
  • Color contrast

Vibe coding & AI

  • Vibe coding
  • Prompt
  • Context window
  • Token
  • AI agent
  • Tool call
  • Hallucination
  • Diff
  • Live preview
  • Checkpoint
  • Git commit
  • Deploy
  • Frontend and backend
  • API
  • Database
  • Rules file
  • MCP
  • Plan mode
  • Visual edit

Where to next

Scroll down to move sideways.

Green northern lights over snowy peaks01Lofoten
Hot air balloons drifting over a rocky valley02Cappadocia
Palm trees leaning over a white beach and turquoise water03Maldives
People crossing a bright, sign-covered street in Tokyo04Tokyo
Snow-covered Ama Dablam rising above a mountain range in Nepal05Nepal

Plan a trip

Tell us where you want to go.