Atelier UI®

DocsCatalogShader StudioPricingGithub
Docs 1.0.0

tools

  • Browse Catalog
  • Shader Studio
    pro
  • Collage
    new

Documentation

  • Installation
  • How to contribute

Components (38)

  • Orbit Gallery
  • Sphere Gallery
  • Glowing Fog
  • Gradient Flow
  • Halftone Glow
  • Scattered Grid
  • Tag Cloud
  • Edge Bounce
  • Fluid Distortion
  • Image Trail
  • Lens Media
  • Liquid Media
  • Magnetic Dot Grid
  • Pixel Media
  • Pixel Trail
  • Curve Media
  • Infinite Gallery
  • Infinite Parallax
  • Infinite Zoom
  • Pixel Scroll
  • Scattered Scroll
  • Elastic Stick
  • Wavy Scroll
  • Pixelated Text
  • Text Bounce
  • Text Fluid
  • Text Scramble
  • Text Roll
  • Clip Reveal
  • Stripe Wipe
  • Sweep Exit
  • Smooth Scroll
  • Text Split
  • WebGL Image
  • WebGL Provider
  • WebGL Scene
  • WebGL Text
  • WebGL Video
Atelier UI 1.0.0 ©2026
Star on githubBuy me a coffeellms.txt
  1. Docs
  2. /
  3. Components
  4. /
  5. Clip Reveal

Clip Reveal

A clip-path reveal that scales the content from a starting inset to fullscreen.

Motion
Tailwind CSS
https://atelier-ui.com/clip-reveal

Settings

duration
2.0
depth
2.0
top
70
left
25
bottom
40
right
25
See the documentation below for more options.

Install

npx atelier-ui add clip-reveal
npm install motion
clip-reveal.tsx
import { motion } from "motion/react"
import type { ReactNode } from "react"

export type ClipRevealProps = {
    children: ReactNode
    className?: string
    duration?: number
    depth?: number
    top?: number
    left?: number
    bottom?: number
    right?: number
    trigger?: boolean
    onComplete?: () => void
}

export function ClipReveal({
    children,
    className,
    duration = 2,
    depth = 2,
    top = 70,
    left = 25,
    bottom = 40,
    right = 25,
    trigger = true,
    onComplete,
}: ClipRevealProps) {
    const insets = `inset(${top}% ${right}% ${bottom}% ${left}%)`

    return (
        <div className={`relative overflow-hidden ${className ?? ""}`}>
            <motion.div
                className="absolute inset-0"
                initial={{ clipPath: insets }}
                animate={{ clipPath: trigger ? "inset(0% 0% 0% 0%)" : insets }}
                transition={{ duration, ease: [0.85, 0, 0.2, 1] }}
                onAnimationComplete={() => trigger && onComplete?.()}
            >
                <motion.div
                    className="w-full h-full"
                    initial={{ scale: depth }}
                    animate={{ scale: trigger ? 1 : depth }}
                    transition={{ duration, ease: [0.85, 0, 0.2, 1] }}
                >
                    {children}
                </motion.div>
            </motion.div>
        </div>
    )
}
prompt.md
## Integrate the <ClipReveal /> component from Atelier UI

You are helping integrate an open-source React component into an existing application.

### Component: ClipReveal
### Description: A clip-path reveal that scales the content from a starting inset to fullscreen.
### Dependencies: motion

---

### Usage Example

```tsx
<ClipReveal className="h-full w-full">
  <img src="/photo.jpg" alt="" className="absolute inset-0 h-full w-full object-cover" />
</ClipReveal>
```

---

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | — | Content to reveal. Required. |
| `className` | `string` | — | Extra classes applied to the wrapper. |
| `duration` | `number` | `2` | Duration of both animations in seconds. |
| `depth` | `number` | `2` | Initial scale of the content before reveal. |
| `top` | `number` | `70` | Starting inset from the top in percent. |
| `left` | `number` | `25` | Starting inset from the left in percent. |
| `bottom` | `number` | `40` | Starting inset from the bottom in percent. |
| `right` | `number` | `25` | Starting inset from the right in percent. |
| `trigger` | `boolean` | `true` | Starts the animation when set to true. |
| `onComplete` | `() => void` | — | Called when the animation finishes. |

---

### Full Component Source

#### src/components/clip-reveal/clip-reveal.tsx

```tsx
import { motion } from "motion/react"
import type { ReactNode } from "react"

export type ClipRevealProps = {
    children: ReactNode
    className?: string
    duration?: number
    depth?: number
    top?: number
    left?: number
    bottom?: number
    right?: number
    trigger?: boolean
    onComplete?: () => void
}

export function ClipReveal({
    children,
    className,
    duration = 2,
    depth = 2,
    top = 70,
    left = 25,
    bottom = 40,
    right = 25,
    trigger = true,
    onComplete,
}: ClipRevealProps) {
    const insets = `inset(${top}% ${right}% ${bottom}% ${left}%)`

    return (
        <div className={`relative overflow-hidden ${className ?? ""}`}>
            <motion.div
                className="absolute inset-0"
                initial={{ clipPath: insets }}
                animate={{ clipPath: trigger ? "inset(0% 0% 0% 0%)" : insets }}
                transition={{ duration, ease: [0.85, 0, 0.2, 1] }}
                onAnimationComplete={() => trigger && onComplete?.()}
            >
                <motion.div
                    className="w-full h-full"
                    initial={{ scale: depth }}
                    animate={{ scale: trigger ? 1 : depth }}
                    transition={{ duration, ease: [0.85, 0, 0.2, 1] }}
                >
                    {children}
                </motion.div>
            </motion.div>
        </div>
    )
}
```

---

### Integration Instructions

1. If you can execute shell commands, run `npx atelier-ui add clip-reveal` from the project root instead of steps 2-3 (it installs everything automatically).
2. Install the npm dependencies: motion.
3. Copy each file from the component source above to the exact path shown.
4. Render `<ClipReveal />` where it belongs in the app, using the usage example as a starting point and the props table to adjust it.

Full documentation: https://atelier-ui.com/en/docs/components/transition/clip-reveal

Usage

<ClipReveal className="h-full w-full">
  <img src="/photo.jpg" alt="" className="absolute inset-0 h-full w-full object-cover" />
</ClipReveal>

API

NameTypeDefaultDescription
childrenReactNode—Content to reveal. Required.
classNamestring—Extra classes applied to the wrapper.
durationnumber2Duration of both animations in seconds.
depthnumber2Initial scale of the content before reveal.
topnumber70Starting inset from the top in percent.
leftnumber25Starting inset from the left in percent.
bottomnumber40Starting inset from the bottom in percent.
rightnumber25Starting inset from the right in percent.
triggerbooleantrueStarts the animation when set to true.
onComplete() => void—Called when the animation finishes.

Credits

Zajno
Page transition that inspired this effect.

Motion
React animation library.

  • Install
  • Usage
  • API
  • Credits
Star on githubBuy me a coffeellms.txt