Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultGallery & images3D Tilt Cards
Tile Fly-ThroughBrowse all 182Torn Paper Swap
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

3D Tilt Cards

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap

Setup

npm i gsap

More like this

  • Card
  • Tilt
  • 3D

Features.

  • A card lifts and tilts towards the mouse in 3D as it moves across it
  • A soft shadow swings the opposite way and blurs more the further the pointer is from the centre
  • Settles flat and lets the shadow fade when the mouse leaves
  • Every move eases in over half a second, so the tilt feels weighty, not twitchy
  • Lift, tilt strength and perspective are all options
  • Mouse only: touch and pen leave the cards still
  • Cards stack into one column at 767px and below
  • Respects prefers-reduced-motion: no lift, tilt or shadow
  • GSAP only, plain CSS for the look

How to get it right.

Give the cards room

At the default lift of 1.1 a 22em card grows by about 1em on each side, and the shadow reaches further. Keep at least the 3em gap between cards and leave space around the row.

Keep the tilt gentle

2° per 100px means about 4° at the edge of a 22em card. Push it past 3 and the cards start to look like they're flipping rather than leaning.

Use pictures that hold up when tilted

Faces and objects with a clear centre read best. Busy edge-to-edge detail can shimmer while the card turns.

Match the shadow to the page

The shadow is --tlc-shadow. It ships soft for a light page; on a dark page it needs a much higher opacity to show at all.

Variations.

  • Default — 1.1 lift, 2° per 100px, 500px perspective
  • Flat lift — data-au-tilt="0": the card grows and casts a centred shadow, no tilt
  • Deep 3D — data-au-perspective="300" and data-au-tilt="3" for a stronger lean
  • Subtle — data-au-lift="1.04" and data-au-tilt="1" for a dense grid
  • Your colours — override --tlc-card and --tlc-shadow on .tlc_row

Where it fits.

  • Lookbooks and campaigns — a row of portrait shots, like this demo
  • Product highlights — three hero products with room to breathe
  • Team or artist pages — portrait cards that react to the visitor
  • Event posters — upcoming dates as tilting poster cards

Frequently asked.

The effect follows a mouse, so touch and pen are ignored and the cards stay still. Nothing breaks; they're plain image cards.

Yes. Add it inside .tlc_card and position it over the image. It tilts with the card. Wrap the card in a link or put a link inside if it should go somewhere.

Set font-size on .tlc_row. Cards are 22em wide at 3:4, so they scale with it.

Yes. Every [data-tlc-card] inside the root tilts on its own. The row doesn't wrap, so add flex-wrap: wrap to .tlc_row for longer sets.

No. Load gsap before the script; nothing else is needed.

Related components.

Pro

File Drawer Cards

Hover

Pro

Capsule Image Hero

Click

Pro

Depth Fly-Through Hero

Load