like-burst

GitHub

为点赞/收藏按钮添加庆祝性粒子爆发微交互,仅限用户触发,支持无障碍偏好设置,提供CSS/JS实现及React集成指南。

recipes/web/like-burst/SKILL.md nexu-io/motion-anything

Trigger Scenarios

需要为互动按钮添加视觉反馈 前端UI增强与动效开发

Install

npx skills add nexu-io/motion-anything --skill like-burst -g -y
More Options

Non-standard path

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

Use without installing

npx skills use nexu-io/motion-anything@like-burst

指定 Agent (Claude Code)

npx skills add nexu-io/motion-anything --skill like-burst -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": null,
        "design_system": {
            "requires": false
        },
        "example_prompt": "Use the like-burst recipe on the heart button in this page: pop the icon on toggle and\nemit a short particle burst on like only, with a prefers-reduced-motion fallback. Keep it\nto one celebratory moment on screen."
    },
    "name": "like-burst",
    "triggers": [
        "like animation",
        "reaction effect",
        "celebration burst",
        "delightful like",
        "点赞特效",
        "惊喜感"
    ],
    "description": "Add a celebratory particle burst to a like \/ favorite \/ reaction button. A delight\nmicro-interaction that fires on user tap only (never on load), bursts on the \"like\"\ntransition (not un-like), and ships a prefers-reduced-motion fallback. Use when a small,\nearned moment of positive feedback will feel good — and only one such moment per screen.\n"
}

like-burst

A celebratory particle burst for like / favorite / reaction buttons. Part of motion-anything; obeys MOTION-SPEC.md.

When to use it

  • Like / favorite / upvote / reaction buttons.
  • A small, earned moment of positive feedback.

When NOT to use it (restraint)

  • Destructive or neutral actions (delete, dismiss, close).
  • When more than one burst could fire at once — one celebratory moment per screen.
  • On load / autoplay. This must be user-triggered.

How to apply

  1. Copy like-burst.css and like-burst.js into the project.
  2. Link them, and mark the button:
    <link rel="stylesheet" href="like-burst.css" />
    <button class="like-btn" data-like-burst aria-pressed="false" aria-label="Like">♥</button>
    <script src="like-burst.js"></script>
    
  3. It auto-attaches to any [data-like-burst], or call attachLikeBurst(el) manually.

Tuning

  • PARTICLE_COUNT / COLORS in like-burst.js (keep particle count modest — taste over spectacle).
  • Pop feel: the lb-pop keyframe (currently 420ms, ease-out). Burst spread: dist in spawnParticles.

Accessibility & performance

  • Honors prefers-reduced-motion: particles are suppressed, a quiet color/scale cue remains.
  • Animates transform/opacity only; removes injected particle nodes after ~700ms.

Framework notes

  • React: call attachLikeBurst(ref.current) in useEffect; or port the click handler into your component and keep the CSS as-is.

Version History

  • b016900 Current 2026-07-11 17:09

Same Skill Collection

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

Metadata

Files
0
Version
b016900
Hash
45396630
Indexed
2026-07-11 17:09

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-13 11:32
浙ICP备14020137号-1 $お客様$