Help us improve
Share bugs, ideas, or general feedback.
From frontend-craft
Implements SVG icon, logo, illustration, and path stroke animations using CSS, Framer Motion, or GSAP. Covers motion accessibility with prefers-reduced-motion and fallback behavior.
npx claudepluginhub bovinphang/frontend-craftHow this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-craft:fec-svg-animationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Provide maintainable, accessible, and performance-controllable animation solutions for SVG icons, illustrations, and data visualizations.
Animates SVG paths with Framer Motion pathLength and CSS stroke-dasharray, morphs shapes, and creates vector effects for icons, logos, and data visualizations in React/TSX files.
Generates professional Lottie animations from static SVGs, replacing After Effects for motion graphics. Supports bezier curves, shape modifiers, character rigs, and frame-by-frame animation.
Animates DOM elements, CSS properties, SVGs, and JavaScript objects using Anime.js timelines, stagger effects, path morphing, and keyframe sequences for complex web animations.
Share bugs, ideas, or general feedback.
Provide maintainable, accessible, and performance-controllable animation solutions for SVG icons, illustrations, and data visualizations.
prefers-reduced-motion.Choose based on complexity and runtime requirements:
| Scenario | Recommendation |
|---|---|
| hover/focus、opacity、transform | CSS animation/transition |
| Path stroke, simple repeating animation | CSS + stroke-dasharray |
| React component state-driven animation | Framer Motion |
| Timeline, complex arrangement, scrolling trigger | GSAP |
| Need to keep static SVG with zero dependencies | CSS or SMIL |
If the animation spans page transitions, scrolling narratives, or complex component arrangements, you should first judge the intensity, lazy loading, and reduced-motion strategies according to the interactive effects workflow; this skill is only responsible for the path, deformation, and icon motion of the SVG graphics themselves.
export function CheckmarkIcon() {
return (
<svg viewBox="0 0 24 24" className="checkmark" aria-hidden="true">
<path
className="checkmark-path"
d="M5 12.5l4.5 4.5L19 7"
fill="none"
stroke="currentColor"
strokeWidth="2.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
.checkmark-path {
stroke-dasharray: 24;
stroke-dashoffset: 24;
animation: draw-checkmark 420ms ease-out forwards;
}
@keyframes draw-checkmark {
to {
stroke-dashoffset: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.checkmark-path {
animation: none;
stroke-dashoffset: 0;
}
}
import { motion, useReducedMotion } from "framer-motion";
export function AnimatedSparkline({ path }: { path: string }) {
const reduceMotion = useReducedMotion();
return (
<svg viewBox="0 0 120 40" role="img" aria-label="Trend Chart">
<motion.path
d={path}
fill="none"
stroke="currentColor"
strokeWidth="2"
initial={reduceMotion ? false : { pathLength: 0, opacity: 0 }}
animate={{ pathLength: 1, opacity: 1 }}
transition={{ duration: 0.7, ease: "easeOut" }}
/>
</svg>
);
}
import { useLayoutEffect, useRef } from "react";
import gsap from "gsap";
export function LogoReveal() {
const rootRef = useRef<SVGSVGElement>(null);
useLayoutEffect(() => {
if (!rootRef.current) return;
const ctx = gsap.context(() => {
gsap.timeline({ defaults: { ease: "power2.out" } })
.from(".logo-mark", { scale: 0.9, opacity: 0, duration: 0.25 })
.from(".logo-line", { strokeDashoffset: 80, duration: 0.55 }, "-=0.1");
}, rootRef);
return () => ctx.revert();
}, []);
return (
<svg ref={rootRef} viewBox="0 0 120 32" aria-hidden="true">
<circle className="logo-mark" cx="16" cy="16" r="10" />
<path className="logo-line" d="M36 16h68" stroke="currentColor" />
</svg>
);
}
transform, opacity and SVG path attributes; avoid frequent modification of layout-related attributes.aria-hidden="true".prefers-reduced-motion, complex animations must provide static or weak motion degradation.Produce a reusable SVG animation component or style solution, including selection reasons, animation degradation and accessibility processing. During verification, check that the animation is smooth, there is no layout jitter, and keyboard and reduced-motion scenes are available.