Measured entry

motion-primitives-tilt

hover-effect3dmotion on file

A client-side React wrapper that tilts its children toward the pointer using spring-smoothed transforms. It ships as source through a shadcn registry entry, imports hooks and the motion element from motion/react, and leaves the child content and styling to the consumer.

Specimen
Motion capture of the mounted demo, recorded by the harness. No audio track.
Harness screenshot of motion-primitives-tilt at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of motion-primitives-tilt at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of motion-primitives-tilt at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for motion-primitives-tilt
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal59.0 KB (124.4 KB build, 65.4 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

A focused, working tilt primitive with a clean wrapper API and no provider requirement. It is a sensible reuse when Motion is already present, but harder to justify as a new dependency for decoration alone. Plan to add touch and reduced-motion behavior if those matter to the product.

Use it if

  • You want a pointer-reactive tilt around an existing card, image, or product preview.
  • Your app already uses Motion and can absorb another client-side interaction.
  • You need configurable rotation direction and spring behavior without building the pointer math yourself.

Skip it if

  • The experience must communicate equally well on touch and keyboard input, where this mouse-driven effect has no equivalent interaction.
  • You need reduced-motion handling built into the component rather than adding that policy yourself.
  • Adding Motion solely for a decorative hover treatment is not worth the dependency cost.
  • You need a polished card primitive with its own layout and visual styling rather than a behavior-only wrapper.

Install

Installation record for motion-primitives-tilt
Declared dependenciesmotion
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

In a non-shadcn project, copy the component into the source tree, install Motion, and keep it behind a React client boundary. Supply all layout and visual classes yourself. Preserve the exported prop spelling when calling the reverse-direction option, or rename it consistently during adoption.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Alternatives

Other published entries for the hover-effect pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.