Depth Card

Perspective depth effect that responds to mouse movement

Mountains

Tall majestic peaks.

Ocean

Clear water, blue skies.

Forest

Old growth, tall trees.

Customize

Width (px)
240
Height (px)
320
Max Rotation (degrees)
20
Max Translation (px)
20
Stagger Delay (ms)
100

Props

22
imagestring

Background image URL for the card (optional if using layers)

Defaultundefined
titlestring

Card title

Default""
descriptionstring

Card description/content

Defaultundefined
widthnumber

Width of the card in pixels

Default240
heightnumber

Height of the card in pixels

Default320
maxRotationnumber

Maximum rotation angle in degrees

Default20
maxTranslationnumber

Maximum translation for parallax effect in pixels

Default20
borderRadiusstring

Border radius of the card

Default"10px"
classNamestring

Additional CSS classes for the wrapper

Default""
contentClassNamestring

Additional CSS classes for the card content

Default""
onClick() => void

Callback when card is clicked

Defaultundefined
hrefstring

URL to navigate to when card is clicked

Defaultundefined
target"_blank" | "_self" | "_parent" | "_top"

Target for link navigation

Default"_self"
imageAltstring

Alt text for the background image

Defaultundefined
disableOnMobileboolean

Disable 3D effects on mobile devices

Defaultfalse
ariaLabelstring

ARIA label for accessibility

Defaultundefined
layersArray<{image: string, depth: number}>

Multiple layers for advanced parallax effect

Defaultundefined
staggerDelaynumber

Stagger delay between content elements in ms

Default100
revealAnimation"slide" | "fade" | "scale" | "none"

Content reveal animation type

Default"slide"
respectReducedMotionboolean

Respect user's reduced motion preference

Defaulttrue
spotlightboolean

Enable spotlight effect that follows the cursor

Defaulttrue
spotlightColorstring

Color of the spotlight effect

Default"rgba(255, 255, 255, 0.5)"