Tilt 3d
Designtilt-3dTilt 3d is an Agent Skill for design published in the nexu-io/motion-anything repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Add tactile depth to a hero card or cover image: it tilts in 3D toward the pointer with a soft glare. Keep the max angle small (~10°) and reserve it for one or a few hero cards, not a grid. Flat under prefers-reduced-motion and on touch.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/nexu-io/motion-anything/blob/HEAD/recipes/web/tilt-3d/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/tilt-3d, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
tilt-3d
A card that tilts in 3D toward the pointer. Part of
motion-anything; obeys MOTION-SPEC.md. Technique
popularized by vanilla-tilt.js, reimplemented dependency-free.
When to use it
- A hero product card, cover image, or a few portfolio thumbnails where depth adds delight.
When NOT to use it (restraint)
- Dense grids — many tilting cards feel chaotic and can induce motion sickness. A few hero cards.
- Text-heavy cards (tilt hurts readability); touch-only contexts (it stays flat automatically).
How to apply
- Copy
tilt-3d.cssandtilt-3d.jsinto the project, and link them. - Mark the card:
<div class="tilt" data-tilt-max="10"> … </div> - Auto-attaches to
.tilt. Keepdata-tilt-maxsmall (8–10). Resets flat onpointerleave.
Accessibility & performance
- Flat under
prefers-reduced-motionand on(hover: none)touch devices. transform: rotateX/rotateY+ a masked glare only — GPU-safe.
Framework notes
- React: call
attachTilt(ref.current)inuseEffect, guarded by the same checks.