Skip to content
motionprompts motionprompts

Bleed Drag Carousel

GSAP animation component · Published 2026-11-21 · by vanguardia.dev

Open live demo ↗ Download source

What it does

Photo carousel that bleeds off both edges of the viewport: a max-content track moved only by transform x between two clamps that leave part of a photo cut off at either end. Large circular arrows step one photo (0.9s power3.out), and pointer dragging follows 1:1 with 35% elastic resistance past the ends and throws with inertia (last velocity × 260 px, 0.8s power3.out) on release, the clamp snapping it back. No Draggable or InertiaPlugin.

How it's built

Categoryslider
Techgsap
Complexitysection
Performance costlight
Mobile-safeyes

carousel slider drag inertia elastic pointer-events bleed gallery

Rebuild it with AI

This component's prompt is part of the paid library. Below you can read how it starts; the full prompt, the exact structure, timing and easing an AI agent needs to rebuild the effect, unlocks with any paid plan, yearly or lifetime.

# Bleed Drag Carousel — a photo strip that bleeds off both edges, dragged with inertia
## Goal
Build a horizontal photo carousel that never ends against a clean margin: at the start, the first photo is already cut off by the left edge of the viewport; at the end, the last one is cut off by the right edge. Six landscape photos (530×420 on desktop) with a small monospaced caption under each. Two large circular arrows (70px) float over the strip, vertically centred on the photos, and move it one photo at a time. The strip can also be dragged with the mouse or a finger: it follows the pointer 1:1, resists elastically past either end (35% of the movement), and on release keeps travelling with the throw's momentum before easing to a stop — and if it was released beyond an end, the same ease brings it back. No Draggable, no InertiaPlugin: GSAP core plus pointer events. On first view the photos rise in with a short stagger.
## Tech
Vanilla HTML/CSS/JS, ES modules, `gsap` (npm) core only. `IntersectionObserver` for the entrance (no ScrollTrigger). Font self-hosted: **IBM Plex Mono** for captions.
## Layout / HTML
```html
<section class="bdc" aria-label="Room photos">
  <div class="bdc__vista">
    <div class="bdc__pista">
      <figure class="bdc__item">
        <div class="bdc__foto"><img src="…/room-1.jpg" alt="…" width="1060" height="840" draggable="false"></div>
…

Premium prompt

Unlock this prompt, and every other one

From $99/year, or $139 once for lifetime access. Commercial license included.

See pricing Or start with the free set Already bought? Sign in

New components in your inbox

One email a week, only when new components ship, each with its live demo and prompt.