/design:to-rn "<animated mark | IR handle | canvas>" [--out <Component.tsx>]from design
Create a React Native SVG animation fallback for light motion.
Ships in design. Installing the plugin adds it to Claude Code.
Follow host conventions for Claude Code or Codex.
The fallback motion handoff for light / occasional animation where you want
a native react-native-svg + Reanimated component instead of a Lottie runtime
(DDR-094).
Prefer
/design-video:to-lottiefor anything rich. The POC proved native fidelity is possible but hit three real walls (DDR-094 Update): (1)feTurbulence/feDisplacementMaphave no native impl in react-native-svg 15.x (procedural texture can't render natively — pre-bake it); (2) continuous multi-layerd-morph froze the app (rn-svg re-parsesd+ re-renders the whole<Svg>every frame; with<Filter>s it ran an offscreen pass per frame); (3) two hand-matched implementations drift. So this is for a blink, a gentle pulse, a single transform — NOT a continuous rich morph. Reference implementation:Mascot.fallback.tsx
- the generator
to-rn.mjs.
| Flag | Default | What it does |
|---|---|---|
"<source>" | — | Required. The animated mark: IR handle / .tsx canvas / SMIL+CSS source. |
--out <path> | <repo>/src/components/<Slug>.tsx (or per project) | Target RN component. |
/design-video:to-lottie (primary) | /design:to-rn (this — fallback) | |
|---|---|---|
| Rich / continuous morph | ✅ | ❌ perf ceiling |
feTurbulence / procedural texture | ✅ (baked in the comp) | ❌ no native impl (pre-bake) |
| Light blink / pulse / single transform | ✅ | ✅ |
| Web + mobile from ONE artifact | ✅ 1:1 | ❌ RN only |
| Theme-aware colors at runtime | host color override | ✅ colors as props (native) |
If the brief is a continuous rich animation, stop and use /design-video:to-lottie —
don't ship a frozen app.
Read the keyframe Timeline: vertex-array d morphs (fixed vertex count — the
interpolability constraint), transform/opacity tracks, the per-track easing handles.
Confirm it's light (a small number of animated nodes, no continuous multi-layer
morph, no procedural texture). If not → /design-video:to-lottie.
Emit a react-native-svg + Reanimated component (reference Mascot.fallback.tsx):
useDerivedValue that vertex-lerps between the IR's vertex
arrays (NOT a string d reparse per frame) and rebuilds the d on the UI thread.
Same fixed vertex count across keyframes (engine morphVariants guarantees it).View transform / Animated style —
NOT an SVG <Filter> (the offscreen-pass-per-frame trap). Position-vs-animation
split applies: static placement off the animated transform.<LinearGradient>/<RadialGradient> with colors passed as props
→ theme-aware (the one place native beats Lottie's baked colors).useReducedMotion() collapses to the rest pose (the RM gate
the format can't carry — references/draw/motion-rules.md M4).feTurbulence — if the mark needs procedural texture, pre-bake it to an
<Image> or accept it's web-only.import { Mascot } from './<Slug>';
<Mascot size={120} tint={theme.accent} /> // colors as props → theme-aware
📱 /design:to-rn — <slug> (FALLBACK — light animation)
Output: <Component.tsx>
Scope: light animation only (rich morph → /design-video:to-lottie)
RM: useReducedMotion() → rest pose
/design-video:to-lottie. Reach for to-rn only when a native rn-svg component is
specifically wanted AND the animation is light.What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
28 commands in this plugin
/assetsList the project's assets, see where each is used, find the ones nothing uses, and search pictures by what they show./boardRead the annotations on a canvas, or lay out a structured template of sticky notes (retro, kanban, roadmap) on it./browseStart the Maude studio for this project and open it./chatOpen the AI chat panel in the running Maude window, or continue an in-app chat from a terminal.npx claudepluginhub 1agh/maude --plugin design