WebGL Shader Hero
BlockWebGLHero
Heroes & Blocks 8 options JavaScript
Full-bleed hero with a chromatic RGB-wave WebGL shader, glass CTA and optional availability badge.
Published · by Christopher Alberto
Live demo
Open full screenAt a glance
- Component
BlockWebGLHero- Category
- Heroes & Blocks
- Used as
- Page block — “Block: WebGL Shader Hero”
- Options
- 8 editable fields
- Built with
- PHP, Twig, SCSS, JavaScript
- Platform
- WordPress · Flynt theme · Timber/Twig · ACF Pro
About this component
A statement hero whose background is a live chromatic RGB-wave shader rendered with plain WebGL — scoped to this block’s own frame rather than the whole site, and without pulling in three.js for a single full-screen triangle.
Highlights
- Optional “available” badge, headline, intro and a glass-style call to action.
- Text stays white over the shader regardless of the season palette, for legible contrast.
- The shader pauses when off-screen and respects reduced-motion preferences.
Under the hood
Components/BlockWebGLHero/
-
_style.scssStyles (SCSS) 119 lines -
functions.phpFields & data (PHP) 98 lines -
index.twigMarkup (Twig) 24 lines -
script.jsBehaviour (JavaScript) 180 lines