Velocity Slice Image

£5

A velocity-reactive image effect that peels one photograph into alternating horizontal slats with directional depth, warm edge light, and a zipper-like settle.

intermediate
5 more details
velocity-reactiveimage-slicing3d-transformshover-effectstagger
Velocity Slice Image - GSAP animation effect preview

This demo reads better at your own screen size than in the frame below:

About this effect

A cinematic image-slice effect that turns a fast horizontal pointer whip into a dramatic dimensional fan. GSAP core measures direction and speed, then drives alternating slat displacement, rotateY depth, translateZ, motion smear, orange edge light, and a darkened under-image from the same velocity signal.

Read the full effect overview

When movement stops, the photograph rebuilds in a clearly ordered zipper with restrained back easing instead of snapping flat. Touch users get a complete tap-triggered burst, keyboard users can fire it with Enter or Space, and reduced-motion or no-JavaScript visitors keep the original crisp image.

What's included

8 items
  • Horizontal velocity controls the strength and direction of every slice in real time
  • Fourteen configurable slats fan in alternating directions for a bold break-frame moment
  • rotateY and translateZ add true perspective depth rather than a flat hover offset
  • Directional blur, orange edge fringe, and under-image darkening share the same velocity input
  • Zipper-like staggered return uses restrained back easing for a crafted settle
  • Rapid direction changes interrupt and replace the current animation without stranded slices
  • Tap, Enter, and Space controls trigger a complete peak burst and automatic settle
  • No-JavaScript and prefers-reduced-motion fallbacks preserve the untouched source image

Perfect for

5 use cases
  • Editorial hero photography that needs a cinematic interactive signature
  • Film and theatre campaign pages with dramatic cast or production imagery
  • Fashion lookbooks where pointer speed can reinforce movement and attitude
  • Creative agency case studies that benefit from one memorable image interaction
  • Album and event launches with high-impact art direction and tactile mobile feedback

How it works

2 sections

The script duplicates the source image into horizontal clipping strips only after the image has loaded and motion is allowed. Pointer distance over elapsed time becomes a signed speed value, and each frame the strips take their offset, turn, depth and filter from it, with alternating multipliers creating the fan. The under-image responds on its own separate horizontal and vertical scales.

After 95 milliseconds without meaningful movement, a timeline takes over and returns the slats to zero with a direction-aware stagger and a soft overshoot. Pointer leave uses the same settle path, while tap and keyboard activation run a designed peak impulse before handing off to that zipper timeline.

Difficulty Intermediate
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Paid effect

Purchase to unlock the code.

Buying Velocity Slice Image opens the HTML, CSS and JavaScript source, the full documentation, an AI setup prompt for your editor, and every update we ship to it. Standard license: unlimited personal and commercial projects.

£5 Standard license, unlimited projects

Browse free effects

Documentation

Quick Start

1. Add to your HTML <head>:

Code snippet omitted: it ships with the download.

2. Add the effect HTML anywhere in your <body>:

Code snippet omitted: it ships with the download.

Use the same image URL for .velocity-under-image and .velocity-original. The script builds its slats from .velocity-original after that image has loaded.

3. Add before the closing </body> tag:

Code snippet omitted: it ships with the download.

Options

Set these attributes on the element with data-velocity-slice.

Attribute Values Default Description
data-slice-count 620 14 Number of horizontal slats. The script clamps values to this range.
data-slice-strength Positive pixels 112 Maximum horizontal displacement at peak velocity.
data-slice-rotation Degrees 34 Maximum alternating rotateY angle.
data-slice-depth Positive pixels 120 Maximum translateZ fan depth.
data-slice-sensitivity Positive number 0.72 Converts pointer speed into the signed -1 to 1 velocity signal.
data-slice-settle Seconds 0.72 Duration of the zipper-like return animation.

Values of 0 fall back to the defaults. Keep slice counts between 10 and 16 for the best balance of detail and rendering cost.

Image Setup

The included demo uses assets/stage.webp, a local 1600×1067 photograph, so it does not depend on a remote image host. Replace both image src values with your own asset. Wide photographs work best with the default 8 / 5 frame; update object-position for the under-image, original, and generated slice images together when the subject is off-centre.

The script waits for the source image's load event before cloning it into strips. This avoids blank slices when the image is not cached.

Accessibility

  • The original image remains crisp and fully visible when JavaScript is unavailable.
  • prefers-reduced-motion: reduce skips slice generation and leaves the source image untouched.
  • The effect root is a semantic button with a visible orange focus ring.
  • Enter and Space fire one complete burst and zipper settle.
  • Focus mirrors the inviting hover state; blur and pointer leave always settle the image.
  • On coarse pointers, a short tap triggers the complete effect. Vertical movement is not cancelled, so a swipe that starts over the image remains normal page scrolling.
  • Keep meaningful alt text on .velocity-original; the under-image and generated slats stay hidden from assistive technology.

Dependencies

Required:

  • GSAP 3.12 or newer (GSAP core with CSSPlugin)

Not required:

  • No GSAP plugins
  • No Lenis
  • No canvas or WebGL library

Worked examples, the events and programmatic API, and the class reference ship with the download, alongside the full source.

Your cart

Your cart is empty

The Vault £99

Everything in the catalogue, plus everything we release next.