← All components
Perspective Tilt In
RevealReveal with a whisper of depth — rise + rotateX settle over a perspective.
Settles from a slight tilt, once.
A beat later — delay 0.15s.
trigger="mount" — plays immediately.
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/perspective-tilt-in.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/perspective-tilt-in.tsxcomponents/motion/perspective-tilt-in.tsx
Usage
Basic
Wrap any card or section — it settles opacity 0 → 1, y +28 → 0, and rotateX 8deg → 0 over an 800px perspective, the first time it is 30% in view.
With delay
Offset sibling tilt-ins by a beat to sequence them without a full Stagger.
Trigger on mount
Play immediately instead of waiting for scroll — for above-the-fold content.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Content that tilts + rises into view. |
| className | string | — | Passed straight through — PerspectiveTiltIn becomes your layout element. |
| style | CSSProperties | — | Inline style passthrough. |
| delay | number | 0 | Seconds before this instance animates. |
| trigger | "inView" | "mount" | "inView" | Animate on scroll-into-view (once) or immediately on mount. |