Chuyển đến nội dung
Skillpedia
Ứng dụng di động48k · #4568

expo-animation

Skill này làm gì

Công cụ này giúp tạo các hiệu ứng chuyển động mượt mà và phản hồi nhanh cho ứng dụng di động, đảm bảo chúng hoạt động tốt trên nhiều thiết bị.

Khi nào nên dùng

  • ✓Khi bạn muốn một phần tử di chuyển mượt mà khi được chạm vào.
  • ✓Khi tạo chuyển cảnh giữa các màn hình hoặc các phần tử.
  • ✓Khi muốn thêm hiệu ứng hình ảnh để nâng cao trải nghiệm người dùng.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/expo-animation/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/expo-animation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo hiệu ứng mờ dần xuất hiện cho một nút bấm khi nó hiện trên màn hình.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng các thư viện cụ thể (như Reanimated) chạy trên đúng 'luồng' của điện thoại, nhờ đó hiệu ứng không bị giật. Trọng tâm là làm cho hiệu ứng chạy mà không ảnh hưởng đến phần còn lại của ứng dụng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

When to Use

  • Use when this upstream workflow matches the user's stated goal.
  • Use when the task requires the procedures documented in this skill.

Building Animations in Expo

This skill was created in collaboration with Emil Kowalski and can also be found in the emilkowalski/skills repository, along with other useful animation skills.

A construction skill for React Native. It turns a request for motion into an implementation that survives a strict review on a real device — not in the simulator, not on a flagship phone in dev mode.

Mobile changes three things about animation, and everything in this skill follows from them:

  1. There is no hover. Every affordance the web puts in hover has to live in press, position, or nothing.
  2. There are two runtimes. Worklets (Reanimated 4) makes this explicit: the React Native runtime, where React renders and your app logic runs, and the UI runtime, where worklets run every frame (plus optional worker runtimes for background work). An animation that touches the RN runtime stutters the moment the app does anything else. The whole craft is keeping motion on the UI runtime.
  3. The user's finger is on the element. Gestures are the primary input, so interruptibility and velocity handoff aren't polish — they're the baseline.

Operating Posture

You are a senior mobile engineer building the animation yourself. Make the call, state the reasoning in one line, write the code. Never present motion options as a menu.

Two failure modes, and the first is worse:

  1. Animating something that shouldn't animate. The gate below exists to produce zero lines of code sometimes.
  2. Animating the right thing on the wrong thread — a setState per frame, a PanResponder, an animated height. It looks fine in dev on your phone and drops to 20fps on a three-year-old Android.

Hard Rules

  1. Run the sequence in order. Steps 1 and 2 gate everything.
  2. Reanimated, not core Animated. Core Animated can't be driven by a gesture without crossing the bridge, and useNativeDriver refuses anything but transform and opacity anyway. Reanimated worklets run on the UI thread and keep running while JS is busy.
  3. No approximated values. Curves and spring configs come from the tables below.
  4. Reduced motion ships with the animation, not as a follow-up.
  5. Feel is judged on a release build on the slowest device you support. Nothing else counts as verified.

The Build Sequence

1. Should this animate at all?

Frequency Decision
100+ times/day — tab switches, keyboard open/close, scrolling, toggles in settings No animation. Platform default or nothing. Stop here.
Tens of times/day — press feedback, list navigation, row selection Near-imperceptible only: under 150ms, or nothing
Occasional — sheets, modals, toasts, onboarding steps Standard animation
Rare / first-time — success states, empty-state illustrations, celebration The delight budget lives here

Tab switches never slide. Tabs are peers, not a hierarchy — sliding implies depth that isn't there, and the user pays for it dozens of times a session. animation: 'none'.

If the request fails this gate, say so and don't write it.

2. What is the purpose?

Name it in one word before continuing: feedback, spatial consistency, state indication, preventing a jarring change, explanation, or delight (rare tier only).

Can't name it? Don't build it.

3. Pick the tool — cheapest that works

Walk down; stop at the first that fits.

Need Tool
A state-driven change with no gesture — press, toggle, color, a value flipping Reanimated CSS transition (transitionProperty in the style)
Loop, multi-stage, or plays on mount with no state change Reanimated CSS animation (animationName keyframes)
An element mounting or unmounting, or a list reflowing Layout animations (entering / exiting / itemLayoutAnimation)
Anything a finger touches, or anything derived from scroll useSharedValue + Gesture + useAnimatedStyle
Screen to screen Native stack options in Expo Router. Never hand-roll this
A bottom sheet that is its own screen presentation: 'formSheet' — it's a real UISheetPresentationController, free and correct

…

Câu hỏi thường gặp

Tại sao không dùng hiệu ứng cho mọi thứ?

Các hiệu ứng không cần thiết có thể làm chậm ứng dụng. Công cụ này giúp quyết định một hiệu ứng có thực sự hữu ích hay tốt hơn là không có.

'Worklets' là gì?

Đó là những đoạn mã nhỏ chạy trực tiếp trên 'UI thread' (luồng xử lý giao diện), giúp các hiệu ứng rất nhanh và mượt.

Vì sao phải chú ý đến các thiết bị chậm hơn?

Để đảm bảo hiệu ứng hoạt động tốt với mọi người dùng, kể cả những người có điện thoại cũ hoặc ít sức mạnh hơn.

Chi tiết

Mô tả gốc của tác giả

Curated upstream guidance for Expo Animation; use when the workflow matches the user goal.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4568
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự