Pluck the Strings Hero Animation with Canvas
Overview
A hero for React and Next.js with gold strings across the page, like a giant instrument. Move the cursor across them and each string vibrates with a real standing wave, then decays, with a glow running along it.
Each string runs the wave equation in a typed array, with its ends fixed at the brass bridges. A pluck bends the string into a triangle and lets go. The bend splits into two kinks that run to the ends and back, then settle into a standing wave, and the high harmonics die first, as they do on a real string. Thin strings at the top vibrate faster than the heavy strings at the bottom. Where a string is moving fastest, it glows, so the light runs along it. There is no sound.
(01)Keep exploring
All 118 componentsBuilt with the same techniques
No. 103 / Hero
Hanging Letters Hero with Physics Strings on Canvas
On Load · Mouse Move · Drag
No. 108 / Cards
Pinned Notes Board Physics Animation with Canvas
On Load · Drag · Mouse Move
No. 104 / Cards
Hanging Price Tags Physics Animation with Canvas
On Load · Mouse Move · Drag
(02)FAQ
Pluck the Strings Hero Animation with Canvas — FAQ
01Does it make sound?
No. It is silent, so it never needs permission to play audio.
02Can I change the colours or the number of strings?
The wall colours are at the top of the build function in strings-scene.ts, and STRING_ROWS lists the height of each string. Leave a gap in those rows for your heading.
03What does it need from my page?
npm install gsap @gsap/react, and Tailwind CSS v4. The serif comes from a CSS variable, --strings-serif, and falls back to Georgia. It uses no WebGL and no other dependencies.
04What happens with reduced motion?
One finished frame with the strings caught mid vibration, all the text visible, and no running loop. The link still works.