3d-text-depth-layers — Claude Code rule: 3D text
The 3d-text-depth-layers rule builds dimensional typography from offset DOM layers. Use it for large hero headings with stacked depth or animated extrusion.
AGPL-3.0 ★ 78,316 updated 2026-10-24
.claude/rules/3d-text-depth-layers.mdWhat 3d-text-depth-layers does
The rule describes a text-depth effect made from repeated layers of one label. Each back layer moves by its own X and Y offset and uses reduced opacity or a different color, while the front copy stays fully visible. The result reads as a physical extrusion rather than a single CSS shadow.
It includes HTML structure, CSS for front and back copies, and JavaScript that creates the layers and controls a GSAP timeline. The timeline can reveal layers in sequence or animate the depth as it grows. Static depth, a pulsing offset, and color changes for rear layers are also covered.
The rule targets Claude Code and Codex. In Claude Code, place it at .claude/rules/3d-text-depth-layers.md; a different path means the rule will not be loaded.
What it helps with
- build a dimensional hero heading from DOM layers
- replace a single CSS shadow with controllable extrusion
- animate layered text entry with GSAP
- tune rear-layer opacity and color
Example prompts for the agent
- Create a large hero heading with stacked depth using the
3d-text-depth-layersrule. - Add a staggered GSAP reveal for the text layers in the hero scene.
- Replace the heading’s
text-shadowwith offset layers that animate their depth.
How to install 3d-text-depth-layers
Manually: put the files in place
.claude/rules/3d-text-depth-layers.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/3d-text-depth-layers.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/3d-text-depth-layers.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/3d-text-depth-layers.mdManually: put the files in place
.clinerules/3d-text-depth-layers.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about 3d-text-depth-layers
How do I install 3d-text-depth-layers in Claude Code?
Place the rule file at .claude/rules/3d-text-depth-layers.md.
What does 3d-text-depth-layers do?
It guides the agent in building 3D-looking typography from several DOM elements. The layers can have separate offsets, colors, opacity values, and animation.
How is this different from text-shadow?
Every depth layer is a real DOM element, so its color, opacity, and animation can be controlled separately.