本文へ移動
cccskills
無料GitHub で公開

tilt-3d

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.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md1.9 KB
  • preview.html1.4 KB
  • recipe.motion.yaml1.7 KB
  • tilt-3d.css1.0 KB
  • tilt-3d.js1.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

  1. Copy tilt-3d.css and tilt-3d.js into the project, and link them.
  2. Mark the card:
    <div class="tilt" data-tilt-max="10"> … </div>
    
  3. Auto-attaches to .tilt. Keep data-tilt-max small (8–10). Resets flat on pointerleave.

Accessibility & performance

  • Flat under prefers-reduced-motion and on (hover: none) touch devices.
  • transform: rotateX/rotateY + a masked glare only — GPU-safe.

Framework notes

  • React: call attachTilt(ref.current) in useEffect, guarded by the same checks.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Back In Down — a drop-in CSS keyframe animation from Animate.css (Hippocratic-2.1, © Daniel Eden). No JS required. Honors prefers-reduced-motion. Use restrained; attribute Animate.css.

日本語の概要は準備中です。原文の説明を表示しています。

nexu-io/motion-anything8592026年7月7日 更新

Back In Left — a drop-in CSS keyframe animation from Animate.css (Hippocratic-2.1, © Daniel Eden). No JS required. Honors prefers-reduced-motion. Use restrained; attribute Animate.css.

日本語の概要は準備中です。原文の説明を表示しています。

nexu-io/motion-anything8592026年7月7日 更新

Back In Right — a drop-in CSS keyframe animation from Animate.css (Hippocratic-2.1, © Daniel Eden). No JS required. Honors prefers-reduced-motion. Use restrained; attribute Animate.css.

日本語の概要は準備中です。原文の説明を表示しています。

nexu-io/motion-anything8592026年7月7日 更新

Back In Up — a drop-in CSS keyframe animation from Animate.css (Hippocratic-2.1, © Daniel Eden). No JS required. Honors prefers-reduced-motion. Use restrained; attribute Animate.css.

日本語の概要は準備中です。原文の説明を表示しています。

nexu-io/motion-anything8592026年7月7日 更新

Back Out Down — a drop-in CSS keyframe animation from Animate.css (Hippocratic-2.1, © Daniel Eden). No JS required. Honors prefers-reduced-motion. Use restrained; attribute Animate.css.

日本語の概要は準備中です。原文の説明を表示しています。

nexu-io/motion-anything8592026年7月7日 更新

Back Out Left — a drop-in CSS keyframe animation from Animate.css (Hippocratic-2.1, © Daniel Eden). No JS required. Honors prefers-reduced-motion. Use restrained; attribute Animate.css.

日本語の概要は準備中です。原文の説明を表示しています。

nexu-io/motion-anything8592026年7月7日 更新

nexu-io のスキルをすべて見る

このスキルの問題を報告する