Soap film
Bubbles
Text
Type
Colour
Ground
Motion
About this effect
Soap film makes every letter the hoop of a bubble wand, a thin shiny rim, with a film of soap stretched across it. The film shows the colours of a thin film, the same bands you see in a bubble: the light reflected from its two faces adds up in some colours and cancels in others, depending on how thick it is. The soap flows in slow eddies, so the bands swirl, and it drains downward, so each film is thickest at the bottom and at its rim, and thins toward the top, through gold to dark just before it bursts. A window is reflected faintly near the top of each.
Your pointer blows on the film: the colours race under it, and if you keep blowing on one letter for a moment too long its film pops, the hole tearing open from where you were in an instant, and a fresh film slides up from the bottom of the hoop. On a loop a film pops by itself every few seconds. The colours come from the physics of a soap film, worked out once for every thickness and looked up as the soap flows. It is drawn on a canvas from the heading's own letters (font, size and line breaks are the page's), and the heading keeps your words for screen readers and search.
Swirl sets how lively the soap is. Heavy, open letters hold the widest films; it suits playful, dreamy, childlike and summery brands, and anything that should feel delicate. It stays on the dark ground in both themes, like the other light effects.
- Formats
- React, HTML
- No dependencies
- Built with
- Canvas, over real text
- Default font Unbounded
- Plays
- Loop, In view, Hover, On load
- Reduced motion
- Respected
- Shows the finished frame
Accessibility. One real heading, read once; the films are drawn on a canvas hidden from screen readers. Under reduced motion the soap holds still and nothing pops on its own; blowing on a letter with the pointer still pops it.
Also known as soap bubble text, iridescent text effect, thin film text, bubble wand text, rainbow swirl text, pop text effect.
Use it in anything you build, client work included, no credit needed. Don’t republish or resell the effect itself.