- name
SKILL.md
File skill tetap berada di repositori penerbit.
Tempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add AThevon/genjutsu --skill motion-principles -a cursor -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add AThevon/genjutsu --skill motion-principles -a claude-code -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add AThevon/genjutsu --skill motion-principles -a codex -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add AThevon/genjutsu --skill motion-principles -a grok -yKirim pesan yang disalin di chat Grok Bot. Bot mengambil SKILL.md ini dari GitHub dan menambahkannya ke skill yang dipakai bersama oleh semua Bot Anda.
Install this skill: https://github.com/AThevon/genjutsu/tree/HEAD/skills/_jutsu/motion-principlesDari penerbit
Version-sensitive. Every API name, SDK gate and browser-support claim below was verified on 2026-09-08 against primary sources. What against, and when, is in
_jutsu/VERSIONS.md. If that date is old, re-verify before acting on a version number.
The foundation. Loaded by every creative skill invocation. Concise rules here. Deep-dive in
references/.
Frequency rule: The more often an animation plays, the shorter and subtler it must be. A button hover (1000x/day) = 100ms opacity. An onboarding reveal (1x ever) = 600ms+ full choreography.
Exit is always more subtle than enter. Enter: 300ms ease-out, full choreography. Exit: 200ms ease-in, opacity only.
Every animated component must respect the user's reduced-motion preference. No exceptions, regardless of platform.
CSS:
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
SwiftUI:
struct AnimatedView: View {
@Environment(\.accessibilityReduceMotion) var reduceMotion
@State var visible = false
var body: some View {
Text("Hello")
.opacity(visible ? 1 : 0)
.animation(reduceMotion ? .none : .spring(response: 0.4, dampingFraction: 0.85), value: visible)
}
}
Compose:
@Composable
fun rememberReduceMotion(): Boolean {
val context = LocalContext.current
return remember {
Settings.Global.getFloat(context.contentResolver, Settings.Global.ANIMATOR_DURATION_SCALE, 1f) == 0f
}
}
@Composable
fun AnimatedComponent(visible: Boolean) {
val reduce = rememberReduceMotion()
val alpha by animateFloatAsState(
targetValue = if (visible) 1f else 0f,
animationSpec = if (reduce) snap() else spring(stiffness = Spring.StiffnessMedium)
)
}
Triggers layout recalculation every frame = jank.
/* BAD */
.drawer { transition: height 0.3s ease; }
.drawer.open { height: 400px; }
/* GOOD */
.drawer { transition: transform 0.3s ease-out; transform: translateY(100%); }
.drawer.open { transform: translateY(0); }
SwiftUI equivalent (BAD vs GOOD):
// BAD - animates frame (causes layout pass)
.frame(height: open ? 400 : 0)
.animation(.easeInOut, value: open)
// GOOD - animates transform via offset
.offset(y: open ? 0 : 400)
.animation(.spring(), value: open)
Compose equivalent (BAD vs GOOD):
// BAD - animates size (full layout pass)
val height by animateDpAsState(if (open) 400.dp else 0.dp)
// GOOD - animates Y offset via graphicsLayer
val translation by animateFloatAsState(if (open) 0f else 400f)
Box(modifier = Modifier.graphicsLayer { translationY = translation })
scale(0) causes elements to vanish in a black hole. Always keep a minimum.
/* BAD */
.modal-exit { transform: scale(0); }
/* GOOD */
.modal-exit { transform: scale(0.95); opacity: 0; }
SwiftUI equivalent:
// BAD
.scaleEffect(visible ? 1.0 : 0.0)
// GOOD
.scaleEffect(visible ? 1.0 : 0.95)
.opacity(visible ? 1.0 : 0.0)
Compose equivalent:
// BAD
Modifier.graphicsLayer { scaleX = if (visible) 1f else 0f; scaleY = if (visible) 1f else 0f }
// GOOD
Modifier.graphicsLayer {
scaleX = if (visible) 1f else 0.95f
scaleY = if (visible) 1f else 0.95f
alpha = if (visible) 1f else 0f
}
Ease-in = slow start. An entering element that hesitates feels broken.
/* BAD */
.card-enter { animation: fadeIn 0.3s ease-in; }
/* GOOD */
.card-enter { animation: fadeIn 0.3s ease-out; }
/* OR spring via JS for natural feel */
Modals, dropdowns, tooltips, tabs -- users are waiting. Respect their time.
// BAD
gsap.to(modal, { opacity: 1, y: 0, duration: 0.8 });
// GOOD
gsap.to(modal, { opacity: 1, y: 0, duration: 0.25, ease: "power2.out" });
SwiftUI:
// BAD
.animation(.easeInOut(duration: 0.8), value: state)
// GOOD
.animation(.spring(response: 0.25, dampingFraction: 0.85), value: state)
Compose:
// BAD
animateContentSize(animationSpec = tween(800))
// GOOD
animateContentSize(animationSpec = spring(stiffness = Spring.StiffnessMediumLow))
This is an accessibility requirement, not a nice-to-have.
// BAD
gsap.from('.hero-title', { opacity: 0, y: 40, duration: 0.6 });
// GOOD
const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (!prefersReduced) {
gsap.from('.hero-title', { opacity: 0, y: 40, duration: 0.6 });
}
See the cross-platform Reduced Motion section above for SwiftUI / Compose equivalents.
transform and opacity (composite-only properties)will-change sparingly and remove it after animation completesrequestAnimationFrame over setTimeout/setInterval for JS animationsanimation-timeline > JS IntersectionObserver > scroll listenersMotion design foundation - timing, easing, enter/exit patterns, accessibility, performance.
---name: motion-principlesdescription: Motion design foundation - timing, easing, enter/exit patterns, accessibility, performance.---# skills/_jutsu/motion-principles/SKILL.mdFAQ
Unduh skills/_jutsu/motion-principles/SKILL.md dari penerbit, atau salin path-nya dan buka repositori. PlugMCP hanya mendaftar skill ini dan tidak meng-host filenya.
Penerbit menyimpannya di https://github.com/AThevon/genjutsu.
Claude, Cursor, Codex, dan Grok Build bisa membaca SKILL.md yang Anda tambahkan dari repositori penerbit. Grok Bot memasangnya saat Anda mengirim tautan folder GitHub skill tersebut di chat.