Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Living wiki of UI design patterns and best practices built with Fumadocs, Next.js, and Base UI components.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/morphing-jump-non-grouped.md
1---2title: Instant Jump for Non-Grouped Icons3impact: MEDIUM4tags: morphing, jump, group5---67## Instant Jump for Non-Grouped Icons89When transitioning between icons NOT in the same group, rotation should jump instantly.1011**Incorrect (always animates rotation):**1213```tsx14useEffect(() => {15rotation.set(definition.rotation ?? 0);16}, [definition]);17```1819**Correct (jumps when not grouped):**2021```tsx22useEffect(() => {23if (shouldRotate) {24rotation.set(definition.rotation ?? 0);25} else {26rotation.jump(definition.rotation ?? 0);27}28}, [definition, shouldRotate]);29```30