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.
A piece of studio glass turning slowly in the dark, a ring, sphere or rounded cube, with softbox strips sliding across it and light splitting into colour at its edges.
Clarity, in every form
Customize
Usage
import { GlassForm } from "@/components/motionkit/glass-form";
<GlassForm
className="h-[32rem] rounded-3xl"
>
<h1>Your hero</h1>
</GlassForm>Motion
The exact curves this component runs, plotted with Motion's own maths.
Form turns
Runs on its own
Product and brand launches, AI and creative tools, architecture and design studios, and hero sections built around a single, striking object.
The ring, sphere or cube is a signed distance function, raymarched pixel by pixel and turned slowly by rotation matrices, with the pointer adding a little turn of its own. Glass reads as glass because of what it reflects and bends, so the environment is a studio: a dark room, light from above, a coloured bounce light from one side and long softbox strips. The refraction is looked up three times with slightly different indices for red, green and blue, which splits light into colour at the edges, and a Fresnel term blends to reflection at glancing angles.
| Prop | Type | Default | Description |
|---|---|---|---|
| shape | "torus" | "sphere" | "cube" | "torus" | The form. |
| colors | [string, string, string] | ["#0B1022", "#7FA8FF", "#FF9AD5"] | The studio, the light from above and a coloured bounce light. |
| dispersion | number | 0.6 | How far the glass splits light at its edges, 0 to 1. |
| iridescence | number | 0.5 | Thin-film sheen at glancing angles, 0 to 1. |
| interactive | boolean | true | Let the pointer turn the form towards it. |
| 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/glass-form. It saves the file to components/motionkit and installs its dependencies.
Glass Form 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.
Drops of iridescent liquid glass drifting in the dark, merging and pulling apart as they pass. The cursor drags a drop of its own through them.
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.
The live preview is free to explore. Plus unlocks the source for Glass Form 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 { GlassForm } from "@/components/motionkit/glass-form";
<GlassForm
className="h-[32rem] rounded-3xl"
>
<h1>Your hero</h1>
</GlassForm>Motion
The exact curves this component runs, plotted with Motion's own maths.
Form turns
Runs on its own
Clarity, in every form