Image Reveal

A clip-path wipe that uncovers images while they settle from a zoom.

gsap@gsap/reactMIT · free

from="up"

from="left"

from="down"

Installation

npx shadcn@latest add https://ombakui.com/r/image-reveal.json

Usage

import { ImageReveal } from "@/components/image-reveal";

<ImageReveal from="left" className="aspect-[3/4] rounded-xl">
  <img src="/photo.jpg" alt="" />
</ImageReveal>

Props

PropTypeDefaultDescription
children*ReactNode–An image, video or anything visual.
from"up" | "down" | "left" | "right""up"Direction the wipe travels.
durationnumber1.4Seconds.
delaynumber0Seconds before starting.
zoomnumber1.3Starting zoom of the content.
classNamestring–