Agent Skillsnexu-io/motion-anything › text-scramble

text-scramble

GitHub

实现文字从乱码到清晰文本的解码动画效果,适用于短标题或技术风格场景。支持无障碍模式,自动忽略减少动效偏好,确保内容可访问性。

recipes/web/text-scramble/SKILL.md nexu-io/motion-anything

触发场景

需要为短标题添加科技感解码动画 实现英雄区文字的动态显示效果

安装

npx skills add nexu-io/motion-anything --skill text-scramble -g -y
更多选项

非标准路径

npx skills add https://github.com/nexu-io/motion-anything/tree/main/recipes/web/text-scramble -g -y

不安装直接使用

npx skills use nexu-io/motion-anything@text-scramble

指定 Agent (Claude Code)

npx skills add nexu-io/motion-anything --skill text-scramble -a claude-code -g -y

安装 repo 全部 skill

npx skills add nexu-io/motion-anything --all -g -y

预览 repo 内 skill

npx skills add nexu-io/motion-anything --list

SKILL.md

Frontmatter
{
    "od": {
        "mode": "prototype",
        "preview": {
            "type": "html"
        },
        "surface": "web",
        "category": "animation-motion",
        "platform": "desktop",
        "upstream": "https:\/\/tympanus.net\/Development\/TextScrambleEffect\/",
        "design_system": {
            "requires": false
        },
        "example_prompt": "Use text-scramble on the hero line for a technical product: it resolves from noise, fast. Just\nthe one line; instant under reduced-motion."
    },
    "name": "text-scramble",
    "triggers": [
        "text scramble",
        "decode text",
        "glitch text reveal",
        "matrix text",
        "解码文字",
        "科技感标题"
    ],
    "description": "Resolve one short headline from random glyphs — a techy decode reveal. One short line only; keep\nit fast. The resolved text is the real, accessible content; under prefers-reduced-motion it appears\ninstantly with no scramble. Avoid on body copy and calm\/luxury tones.\n"
}

text-scramble

A line of text that resolves from random glyphs. Part of motion-anything; obeys MOTION-SPEC.md. Technique popularized by Codrops, reimplemented dependency-free.

When to use it

  • A hero word / short headline with a technical or futuristic tone; cycling a few phrases on one line.

When NOT to use it (restraint)

  • Long text or body copy — unreadable while scrambling. One short line.
  • Calm / editorial / luxury tones (feels gimmicky).

How to apply

  1. Copy text-scramble.js into the project and link it.
  2. Mark the element:
    <span class="scramble" data-text="motion, anything"></span>
    
  3. Auto-plays data-text on load. To change the phrase later: scrambleTo(el, "next phrase").

Accessibility & performance

  • Under prefers-reduced-motion the final text appears instantly (no scramble). The resolved data-text is always the real content.
  • Swaps text content on rAF; keep the line short so it stays cheap.

Framework notes

  • React: keep a ref and call scrambleTo(ref.current, text) on mount / when the phrase changes.

版本历史

  • b016900 当前 2026-07-11 17:11

同 Skill 集合

recipes/animxyz/xyz-fade-big/SKILL.md
recipes/animxyz/xyz-fade-down/SKILL.md
recipes/animxyz/xyz-fade-left/SKILL.md
recipes/animxyz/xyz-fade-right/SKILL.md
recipes/animxyz/xyz-fade-small/SKILL.md
recipes/animxyz/xyz-fade-up/SKILL.md
recipes/animxyz/xyz-flip-left/SKILL.md
recipes/animxyz/xyz-flip-up/SKILL.md
recipes/animxyz/xyz-rise-big/SKILL.md
recipes/animxyz/xyz-rotate/SKILL.md
recipes/app/bottom-sheet/SKILL.md
recipes/app/button-press/SKILL.md
recipes/app/checkbox-pop/SKILL.md
recipes/app/ripple/SKILL.md
recipes/app/tab-bar-slide/SKILL.md
recipes/app/toast-pop/SKILL.md
recipes/css/anim-backindown/SKILL.md
recipes/css/anim-backinleft/SKILL.md
recipes/css/anim-backinright/SKILL.md
recipes/css/anim-backinup/SKILL.md
recipes/css/anim-backoutdown/SKILL.md
recipes/css/anim-backoutleft/SKILL.md
recipes/css/anim-backoutright/SKILL.md
recipes/css/anim-backoutup/SKILL.md
recipes/css/anim-bounce/SKILL.md
recipes/css/anim-bouncein/SKILL.md
recipes/css/anim-bounceindown/SKILL.md
recipes/css/anim-bounceinleft/SKILL.md
recipes/css/anim-bounceinright/SKILL.md
recipes/css/anim-bounceinup/SKILL.md
recipes/css/anim-bounceout/SKILL.md
recipes/css/anim-bounceoutdown/SKILL.md
recipes/css/anim-bounceoutleft/SKILL.md
recipes/css/anim-bounceoutright/SKILL.md
recipes/css/anim-bounceoutup/SKILL.md
recipes/css/anim-fadein/SKILL.md
recipes/css/anim-fadeinbottomleft/SKILL.md
recipes/css/anim-fadeinbottomright/SKILL.md
recipes/css/anim-fadeindown/SKILL.md
recipes/css/anim-fadeindownbig/SKILL.md
recipes/css/anim-fadeinleft/SKILL.md
recipes/css/anim-fadeinleftbig/SKILL.md
recipes/css/anim-fadeinright/SKILL.md
recipes/css/anim-fadeinrightbig/SKILL.md
recipes/css/anim-fadeintopleft/SKILL.md
recipes/css/anim-fadeintopright/SKILL.md
recipes/css/anim-fadeinup/SKILL.md
recipes/css/anim-fadeinupbig/SKILL.md
recipes/css/anim-fadeout/SKILL.md
recipes/css/anim-fadeoutbottomleft/SKILL.md

元信息

文件数
0
版本
b016900
Hash
2eac34b2
收录时间
2026-07-11 17:11

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-06 16:49
浙ICP备14020137号-1 $访客地图$