Griflan Hover Effect
What it does
Three stacked service rows expand on hover with an elastic GSAP tween: a fanned stack of three images slides up behind the title, the title recolors from red to cream, and after 0.2s pill-shaped tags drop into the row under Matter.js gravity, bouncing and settling on an invisible floor. On mouseleave the tags fade out and the row springs back closed.
How it's built
| Category | hover |
|---|---|
| Tech | gsap, matter-js |
| Complexity | section |
| Performance cost | heavy |
| Mobile-safe | desktop-first |
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.
# Griflan Hover Effect — Elastic Service Rows with Falling Physics Tags
## Goal
Build a dark, full-viewport list of **three stacked "service" rows**, each a single huge uppercase word (`SILHOUETTE`, `CHROMA`, `PERSONA`). On **hover** a row does three things at once: it springs open to more than double its height with a bouncy elastic tween, a **fanned stack of three overlapping images** slides up into view from behind the title, and the title **recolors from red to cream**. Then, 0.2s later, the row's category **tags — pill-shaped labels — drop in from the top under real gravity** (a Matter.js physics simulation), bounce, and settle in a little heap on an invisible floor at the bottom of the row. On **mouseleave** the tags fade out, the images slide back down behind the title, the color returns to red, and the row springs shut. The star effect is the combination of the elastic expand + image-stack reveal + physics-driven tag drop.
## Tech
Vanilla HTML/CSS/JS with ES module imports. Use `gsap` (npm) and `matter-js` (npm) — **no GSAP plugins, no smooth-scroll, no Three.js**. GSAP drives the row expand/collapse, the image slide, the color change and the tag opacity; Matter.js runs a per-row rigid-body world that makes the tags fall and pile up. Ship one `index.html` (`<link rel="stylesheet" href="./styles.css">` and `<script type="module" src="./script.js">`), one `styles.css`, one ES-module `script.js`. Must run in a fresh Vite + npm project.
## Layout / HTML
```html
<section class="services">
<div class="service"
data-tags="Editorial, Fashion Identity, Monochrome, Shadow Play, Minimalism, Studio Portraits">
<div class="service-name"><h1>Silhouette</h1></div>
<div class="service-images">
…
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.