Text Animation
Designtext-animationText Animation is an Agent Skill for design published in the notque/vexjoy-agent repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Dependency-free kinetic typography: roll/slot text, reveals, typewriter, crossfade.
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.
Inspect the Agent Skill at https://github.com/notque/vexjoy-agent/blob/HEAD/skills/frontend/text-animation/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/text-animation, 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.
Text Animation Skill
Overview
Animates text in HTML artifacts with zero runtime dependencies: per-character roll/slot transitions, split-letter reveals, typewriter, and crossfade swaps. Every pattern is vanilla JS + CSS, copied inline into the artifact and adapted to its content.
Iron Rule: Zero npm
No npm packages, no CDN scripts, no build step, no external assets, ever. Every animation ships as inline <style> and <script> in the artifact itself. If a request seems to need a library (GSAP, anime.js, Framer Motion), use the reference patterns instead — they cover the same effect class.
html-artifact Contract Compliance
Output embedded in an artifact must satisfy the html-artifact contract:
- Single self-contained
.htmlfile. - All CSS inline in
<style>, all JS inline in<script>. - ≤500KB total file size.
- No CDN links, no external fonts, no remote assets.
- Respect
prefers-reduced-motion: collapse durations to 0 when set.
Workflow
- Classify the request. Roll/slot transition between strings →
references/roll-text.md. Entrance reveal, typewriter, or content swap →references/text-animation-patterns.md. Load only the matching reference. - Copy the pattern inline. Lift the CSS and JS from the reference into the artifact's
<style>/<script>. Rename hooks to match the artifact's naming. - Tune the knobs. Duration, stagger, easing, direction — each reference documents its knobs. Match the artifact's motion language (see distinctive-frontend-design when active).
- Verify. Open the file standalone; animation runs offline with no console errors.
Reference Loading Table
| Signal | Load These Files | Why |
|---|---|---|
| roll, slot, slot machine, retargeting label, rolling counter, string-to-string transition | references/roll-text.md | Complete roll-text demo plus extraction guide and knobs (duration, stagger, easing, direction) |
| reveal, entrance, typewriter, terminal effect, crossfade, swap text | references/text-animation-patterns.md | Split-letter reveal, typewriter, and crossfade swap snippets with usage notes |
Error Handling
Animation does not run when the page opens
Cause: transition start and end states applied in the same style flush; the browser batches them.
Solution: force a reflow (void el.offsetHeight) between setting the start state and the end state, as the reference patterns do.
Characters jump width mid-animation
Cause: variable-width glyphs swapped without animating the cell width. Solution: use the roll-text pattern's measured-width transition; it animates each cell from old-glyph width to new-glyph width.
Reference Files
references/roll-text.md: roll/slot pattern — standalone runnable demo, extraction guide, knob tablereferences/text-animation-patterns.md: companion patterns — split-letter reveal, typewriter, crossfade swap