mastering-animate-presence
✓使用 Motion 的 AnimatePresence 組件實現退出動畫的指南。當對離開 DOM 的元素進行動畫處理、協調嵌套退出或管理存在狀態時使用。觸發涉及 React 退出動畫、卸載轉換或運動庫模式的任務。
SKILL.md
When elements leave the DOM, they're gone—no way to animate something that doesn't exist. Motion's AnimatePresence solves this by keeping departing elements mounted long enough to animate out.
| AnimatePresence | Wrapper that enables exit animations | | useIsPresent | Hook to read if component is exiting | | usePresence | Hook for manual exit control with safeToRemove | | propagate | Prop to enable nested exit animations | | mode | Controls timing between enter/exit (sync, wait, popLayout) |
Use useIsPresent when a component needs to know it's exiting:
使用 Motion 的 AnimatePresence 組件實現退出動畫的指南。當對離開 DOM 的元素進行動畫處理、協調嵌套退出或管理存在狀態時使用。觸發涉及 React 退出動畫、卸載轉換或運動庫模式的任務。 來源:raphaelsalaja/userinterface-wiki。
可引用資訊
為搜尋與 AI 引用準備的穩定欄位與指令。
- 安裝指令
npx skills add https://github.com/raphaelsalaja/userinterface-wiki --skill mastering-animate-presence- 分類
- </>開發工具
- 認證
- ✓
- 收錄時間
- 2026-02-01
- 更新時間
- 2026-02-18
快速解答
什麼是 mastering-animate-presence?
使用 Motion 的 AnimatePresence 組件實現退出動畫的指南。當對離開 DOM 的元素進行動畫處理、協調嵌套退出或管理存在狀態時使用。觸發涉及 React 退出動畫、卸載轉換或運動庫模式的任務。 來源:raphaelsalaja/userinterface-wiki。
如何安裝 mastering-animate-presence?
開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/raphaelsalaja/userinterface-wiki --skill mastering-animate-presence 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用
這個 Skill 的原始碼在哪?
https://github.com/raphaelsalaja/userinterface-wiki
詳情
- 分類
- </>開發工具
- 來源
- skills.sh
- 收錄時間
- 2026-02-01