← All components
Surfaces / component

Tilted Card

A photograph tilts with spring physics and a floating caption.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • The included Demo.tsx and shared/demo.css recreate the complete preview. Import the main component to compose your own design.
  • Reduced motion keeps a still effect. Hidden and offscreen instances stop requesting frames; all owned work is cancelled on unmount.
  • Focus the image and use arrow keys to tilt; Home returns it to center. Replace the included demo photograph using imageSrc and describe it with altText.
React 19CSSFramer Motion 12.42.2

React Bits · MIT with Commons Clause. Used with explicit project permission; see bundled notice.

Props

PropTypeDefaultDescription
imageSrc (required)string— (required)Image URL
altTextstringTilted card imageImage description
captionTextstring''Caption
rotateAmplitudenumber14Tilt amplitude
scaleOnHovernumber1.1Hover scale
imageHeightstring | number300pxImage height
imageWidthstring | number300pxImage width
showTooltipbooleantrueShow caption
showMobileWarningbooleantrueShow touch hint
containerHeightCSSProperties[height]300pxHeight of the perspective stage.
containerWidthCSSProperties[width]100%Width of the perspective stage.
overlayContentReactNodeundefinedOptional layer lifted 30px above the image.
displayOverlayContentbooleanfalseDisplay the optional overlay layer.
pausedbooleanfalseFreeze the current frame; hidden time is excluded.
replayTokennumber0Change this value to restart the effect.