Mask

WebGL fluid trail that melts a cover to reveal content underneath.

Move across the surface and a GPU density field carves the cover away. Content underneath shows through, then the veil seals back as the trail fades.

Cover
72px
0.7
0.72
0.55
tsx
import { Mask } from "@/components/motion/mask"export function Example() {  return (    <Mask      className="aspect-[16/10] w-full"      radius={72}      softness={0.7}      persistence={0.72}      viscosity={0.55}      coverColor="#09090b"    >      <img        src="/assets/brand/demos/attachments/attachment-2.png"        alt=""        className="size-full object-cover"      />    </Mask>  )}

Installation

npx @arctis-sh/@arctis-sh/ui@latest add mask

Usage

import { Mask } from "@/components/motion/mask"
<Mask className="aspect-[16/10] w-full" coverColor="#09090b">  <img src="/photo.jpg" alt="" className="size-full object-cover" /></Mask>

API Reference

Mask

PropTypeDefault
radiusnumber72
softnessnumber0.7
persistencenumber0.72
viscositynumber0.55
coverColorstring#09090b
classNamestring—
childrenReactNode—

Also accepts the other native div attributes. Radius is in pixels. Uses ogl for the WebGL sim.