About this set
Two hero sections with a looping background video that stays out of the visitor’s way. The full-bleed hero puts a heading, a lead paragraph and two call-to-action links over a dark gradient scrim on a silent colour-field loop, with a Pause button in the bottom right corner. The split hero puts the copy and three figures on the left and frames the same loop in a rounded card on the right, with its own Pause button. The video element is muted, loops, plays inline and has no autoplay attribute: the script starts it only when the visitor has not asked for reduced motion, and pauses it while the hero is scrolled out of view to save battery. The Pause button satisfies WCAG 2.2.2 for moving content that lasts longer than five seconds; its label changes between Pause background video and Play background video, and the visitor’s choice wins over the reduced-motion default. The poster image shows whenever the video is not playing, so visitors without JavaScript or with reduced motion see a still frame. The demo loop is a silent clip that plays forward and then in reverse, so it has no visible seam.
What’s included
- Muted, inline, looping background video with a poster fallback
- Visible Pause and Play button for WCAG 2.2.2
- No playback under prefers-reduced-motion unless the visitor starts it
- Pauses while the hero is off screen
- Full-bleed and split layouts
Accessibility
The video is decorative and hidden from assistive technology, while the heading carries the section's name. The pause button has visible text and an aria-label that names the background video, and it shows a white outline on focus. Under prefers-reduced-motion the video does not start and the poster stays until the visitor presses Play.
Customise it
Change --vh-accent on .vh for the split hero's buttons and kicker, the gradient on .vh-full::before for scrim strength, and min-height on .vh-full for hero height. Bootstrap uses .btn-light, .btn-outline-light and .btn-primary variables; in Tailwind edit the before:bg-[...] gradient and button colours.






