Ribbons of iridescent glass drifting through the dark, twisting to bright edges side-on and blooming with colour face-on, like light on a soap film.
The colours of a soap bubble spread across the dark: bands of interference colour swirl, streak and fade to black where the film is thinnest. The cursor stirs it.
Customize
Usage
import { ThinFilm } from "@/components/motionkit/thin-film";
<ThinFilm
className="h-[32rem] rounded-3xl"
>
<h1>Your hero</h1>
</ThinFilm>Motion
The exact curves this component runs, plotted with Motion's own maths.
Film swirls
Runs on its own
Holographic and iridescent brands, beauty and fashion, music and nightlife, and launch pages that want colour without a busy picture.
The colours on a soap bubble come from interference: light reflecting off the film's front and back surfaces, which strengthens some wavelengths and cancels others depending on how thick it is. The shader stands in for thickness with domain-warped noise that drifts slowly, and maps it through a cosine palette several times over, so colour bands repeat as the film thickens. Where the film is thinnest it turns black, as real film does just before it bursts. Fine streaks are added from a sharpened noise, and the pointer rotates the coordinates near it into a swirl.
| Prop | Type | Default | Description |
|---|---|---|---|
| colors | [string] | ["#05060A"] | The black the film floats on. |
| hue | number | 0 | Shifts the whole spectrum, 0 to 1. |
| intensity | number | 0.8 | How vivid the colours are, 0 to 1. |
| scale | number | 1 | Swirl size; lower is larger and lazier. |
| interactive | boolean | true | Let the pointer stir the film. |
| speed | number | 1 | How fast it moves. 0 holds it still. |
| children | ReactNode | — | Your content, layered above. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Nothing beyond React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes, with MotionKit Plus. Add the @motionkit registry and your personal token to components.json (the snippet is on your account page), then run npx shadcn@latest add @motionkit/thin-film. It saves the file to components/motionkit and installs its dependencies.
Thin Film is part of MotionKit Plus (£12 / $15 / €14 a month or £96 / $120 / €112 a year). The live preview and playground are free to explore; Plus unlocks its source code, every customisation control and commercial use.
With reduced motion on, it's drawn once and holds still. It also stops rendering off screen.
Ribbons of iridescent glass drifting through the dark, twisting to bright edges side-on and blooming with colour face-on, like light on a soap film.
Sunlight on the floor of a pool: a shifting web of light over deep water, edged with a faint rainbow, that swells as the cursor passes.
Above the clouds at golden hour: banks of cloud drift past in three depths, lit on the edges facing a glowing sun, parting as the cursor passes.
Every colour at once
The live preview is free to explore. Plus unlocks the source for Thin Film and every other premium component.
Not ready for Plus? A free account unlocks 4 premium components, Depth Card, Rolling Text, Dot Wave and Confetti Button, with no card needed.
Customize
Usage
import { ThinFilm } from "@/components/motionkit/thin-film";
<ThinFilm
className="h-[32rem] rounded-3xl"
>
<h1>Your hero</h1>
</ThinFilm>Motion
The exact curves this component runs, plotted with Motion's own maths.
Film swirls
Runs on its own
Every colour at once