← All components
Clip Reveal
ClipDirectional clip/wipe reveal — content wipes open from a chosen edge.
up
down
left
right
Installation
One command drops the source into your repo — editable, with the provider and motion pulled in automatically.
npx shadcn add https://motion.asmitsah.dev/r/clip-reveal.jsonPrerequisiteInstall the provider base first
This component imports from @/lib/motion and needs <MotionProvider> mounted in your root layout — install the base once, before copying this component.
npx shadcn add https://motion.asmitsah.dev/r/provider.jsonStep 1Install the runtime dependency
npm install motionStep 2Copy the source into
components/motion/clip-reveal.tsxcomponents/motion/clip-reveal.tsx
Usage
Basic
Wraps any block — a hard clip-path inset() wipes open from the bottom edge, once, on scroll into view.
Direction
Four edges to wipe from — pick the one that matches the content's entrance.
Trigger on mount
Skip the scroll observer and wipe open immediately — for hero content already in view.
With delay
Offset sibling wipes by a beat to sequence them.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Content the wipe reveals — the box stays put while it unveils. |
| className | string | — | Passed straight through — ClipReveal becomes your layout element. |
| style | CSSProperties | — | Inline style passthrough. |
| delay | number | 0 | Seconds before this instance animates. |
| trigger | "inView" | "mount" | "inView" | Wipe on scroll into view (once, 30% visible) or immediately on mount. |
| direction | "up" | "down" | "left" | "right" | "up" | Edge the clip-path wipe retracts from — the box itself stays put. |