Najar: Interactive Hero Section with Video Mask and Cursor Trail (https://<https://jsfiddle.net/S...Najar: Interactive Hero Section with Video Mask and Cursor Trail (https://<https://jsfiddle.net/S...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
"A fashion brand landing page where text reveals video and the cursor leaves a trail of editorial images"
I built this hero section for a fashion brand called Najar. The main idea: the brand name acts as a mask that reveals video underneath, and when you move your cursor across the page, it leaves behind a trail of editorial fashion images.
The result is a landing page that feels alive. The text is not static. The cursor is not just a pointer. Everything moves.
WHAT I WAS BUILDING:
A text mask that clips video to the shape of the letters
A cursor trail that spawns images wherever the mouse moves
Smooth transitions so nothing feels jarring
The text mask works by using CSS clip-path or canvas compositing. The video plays inside the letter shapes, so you see motion through the typography. The cursor trail stores the last N mouse positions and places small images at each point, then fades them out over time.
THE TECHNICAL SIDE:
The page uses HTML, CSS, and JavaScript. No frameworks, no libraries.
The text mask is the core effect. I rendered the brand name on an offscreen canvas, then used that as a clipping mask for the video element. Every frame, the video draws only where the text pixels exist.
For the cursor trail, I tracked mouse movement with event listeners and stored positions in an array. Each position gets a small image element that fades out and removes itself after a short delay. The images are editorial fashion shots that match the brand feel.
The layout is minimal. Dark background, centered text, nothing else. All the attention goes to the interaction.
WHAT I LEARNED:
Canvas compositing is powerful but fiddly. Getting the text mask to update every frame without lag took some optimization.
The cursor trail needed throttling. Without it, too many images spawned on fast mouse moves and the page slowed down. I limited the spawn rate and capped the array length.
Built the site for Linea — a boutique rail brand where the whole UI is made of the same rule as the print system.
Every route card's red line isn't decoration, it's that route's actual elevation profile. Fare tiers aren't styled, they're the same data at different density.
The logo's sparkle mark even resolves from the exact same contour-drawing logic, live on the page.
Every route has a shape. Most travel brands decorate over it.
For Linea, I built the whole system — ticket, app, uniform, packaging, site — around one rule: trace the actual terrain. Even the logo mark is generated by the same line that draws the mountains.