tween
ComponentsTemplatesShowcaseContact

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Installation
  • StoryNew
Guides
  • Motion Principles
  • Scroll and Smooth Scroll
  • Performance and Accessibility
Scroll Animations
  • Sticky Cards Scroll
  • Rise Fan Cards Scroll
  • Rotate Stack Scroll
  • Doodle Lens ScrollNew
  • Slit Open Hero ScrollNew
  • Logo Mask Zoom ScrollNew
  • ASCII Dissolve ScrollNew
  • Lottie Flight ScrollNew
  • Inline Icon Text ScrollNew
  • Starfield ScrollNew
  • Name Swap ScrollNew
  • Spotlight Gallery HeroNew
  • Slit Rotate Hero ScrollNew
  • Stroke Cover ScrollNew
  • Stroke Rows ScrollNew
Text Animations
  • Text Skew Reveal
  • Block Text Reveal
Hover & Cursor
  • Image Trail Cursor
  • Cursor Depth Logo
  • Physics Tag Drop
  • Elastic Card ListNew
  • Magnetic Cards SpringNew
Sliders & Carousels
  • Wheel Fullscreen Carousel
  • Ripple Displacement Slider
  • Three.js Blend Slider
  • Stacked Deck Slider
  • Orbit Cylinder SliderNew
  • Fan Stack SliderNew
  • Exponential Strip SliderNew
  • Dual Column SliderNew
Galleries & Grids
  • Scroll Wave Gallery
Menus & Navigation
  • Shrink Page MenuNew
Preloaders & Intros
  • Floating Items RevealNew
  • Word Cycle RevealNew
  • Tile Grid LoaderNew
Page Transitions
  • Panel Assembly TransitionNew
3D & WebGL
  • Fractal Glass Hero
  • Fluid Cursor Canvas
  • Fluid Portrait Hero
  • Fluid Gradient Canvas
  • Inversion Lens HoverNew
UI Elements
  • Circular Widgets
  • Vinyl Cover
  • Image Explosion Footer
  • Accordion Image FramesNew

(Tween) — Motion registry

Animated components & full sites, one command away.

Product

  • Components
  • Templates
  • Installation
  • Guides
  • Blog
  • Contact

Categories

  • Scroll Animations
  • Text Animations
  • Hover & Cursor
  • Sliders & Carousels
  • Galleries & Grids
  • Menus & Navigation
  • Preloaders & Intros
  • Page Transitions
  • 3D & WebGL
  • UI Elements
TWEEN
ease: power2.inOut0.00s
© 2026 TweenBack to topBuilt by mohammad
  1. Docs/
  2. Components/
  3. Cursor Depth Logo

Cursor Depth Logo

PreviousNext

A logo extruded into stacked silhouette-masked color slabs that trail the cursor with a staggered lerp, faking parallax depth.

Open in
cursor-depth-logo-demo
Velastra
components/ui/cursor-depth-logo-demo.tsx
import { CursorDepthLogo } from "@/registry/tween/cursor-depth-logo"

export function CursorDepthLogoDemo() {
  return <CursorDepthLogo />
}

Installation

pnpm dlx shadcn@latest add https://tweenui.dev/r/cursor-depth-logo.json

Usage

import { CursorDepthLogo } from "@/components/ui/cursor-depth-logo"
<CursorDepthLogo
  logoSrc="/brand/corviel-mark.svg"
  logoAlt="Corviel"
  background="hsl(196, 70%, 42%)"
  layers={[
    { size: 90, color: "hsl(198, 74%, 30%)", shadow: "hsl(200, 80%, 14%)" },
    { size: 45, color: "hsl(196, 72%, 38%)" },
    { size: 15, color: "hsl(194, 70%, 46%)" },
  ]}
/>

Each slab is a full-bleed colored box with the logo silhouette subtracted out of it via a CSS mask, sized progressively smaller from front to back. A pointermove listener scoped to the hero records a cursor trail; every frame each slab samples a delayed point from that trail and lerps toward it, so deeper slabs lag further behind and the stack appears to swing in 3D. The real logo sits on top, untouched. Pointer tracking binds to the component element (never the window), so it never hijacks page scroll. When prefers-reduced-motion: reduce is set, the slabs stay centered and the trail loop never starts.

Props

PropTypeDefaultDescription
logoSrcstringVelastra star (SVG)Logo shown on top and used as the silhouette mask.
logoAltstring"Velastra"Alt text for the logo image.
maskSrcstringlogoSrcSeparate silhouette mask; defaults to the logo's own alpha.
backgroundstringhsl(26, 92%, 62%)Hero background color.
logoWidthnumber200Rendered width of the front logo, in pixels.
layersCursorDepthLayer[]5 defaultsSlabs front-to-back: { size, color, shadow? }. size is mask % size.
sensitivitynumber0.3Fraction of the hero the cursor can push the stack across.
lerpnumber0.04Per-frame easing toward the cursor trail (lower = smoother).
staggerDelaynumber8Frames each successive slab lags behind the one in front.
classNamestring—Extra classes on the hero container.
Image Trail CursorPhysics Tag Drop

On This Page

InstallationUsageProps

Contribute

  • Report an issue
  • Request a feature
  • Edit this page