Depth Parallax Hero
A layered SVG landscape — sun/moon, three mountain planes and a tree line — shifting at depth-correct factors with the pointer or a slow idle sway; the giant name sits between the planes.
Try it: Move the pointer — near layers travel further than far ones.
Brings its own background. Paints its own generated landscape (dawn on light, dusk on dark) via light and dark: variants, so it matches the host page. Override the surface with className (e.g. bg-*, rounded-*, min-h-*).
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/depth-parallax-hero.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/depth-parallax-hero. You can also copy the source into components/ui/depth-parallax-hero.tsx (view on GitHub).
Usage
import { DepthParallaxHero } from '@/components/ui/depth-parallax-hero'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
eyebrow | string | — | Small label. |
name | string | 'Mira Castell' | First word becomes the giant backdrop word. |
title | string | — | Headline. |
description | string | — | Supporting paragraph. |
ctaLabel | string | — | Primary button label. |
onCta | () => void | — | Primary button handler. |
strength | number | 1 | Parallax multiplier (0 disables). |
className | string | — | Extra classes merged onto the root. |
Dependencies
motionlucide-react
Related Hero components
- Role Morph Hero
“a ____.” where the blank cycles through your roles: letters of the old role drop away with a blur, the next role springs up in a stagger, the highlighter springs to the new width and a colour wash…
- Spotlight Reveal Hero
A quiet paper-and-ink hero with a cursor-lit lens that reveals a saturated, grid-drawn “lit” version of the same message; the beam wanders on its own when idle and locks onto the button on keyboard…
- Photo Strip Hero
A big headline over two tilted rails of photo cards drifting in opposite directions — they slow under the pointer, surge with scroll velocity and lift on hover.
- Kinetic Name Hero
Your name set huge, every letter on its own spring — letters are pushed away, tilt and swell as the cursor passes, then ease home; a soft light trails the pointer and a badge circles the role.
- Terminal Dev Hero
A developer intro with a live terminal: commands type with human rhythm, outputs stream in, a build bar fills and the window floats in 3D with the pointer. Pause and replay included.
- Ridgeline Horizon Hero
Headline words rise out of masks above a canvas terrain of stacked ridgelines receding to a sunrise; the pointer raises a swell that rolls back to the horizon and clicks send a ripple.