Langsung ke konten
Skillpedia
Website & UI (frontend)75k · #2722

animation-performance

Fungsinya

Skill ini memeriksa animasi CSS untuk properti yang memperlambat rendering. Cocok untuk pengembang yang menginginkan gerakan yang mulus di situs web.

Kapan dipakai

  • ✓Saat animasi CSS terlihat patah-patah atau tersendat di halaman.
  • ✓Saat sebuah stylesheet menganimasikan ukuran, posisi, atau margin.
  • ✓Saat Anda ingin animasi Anda menghormati pengaturan gerakan berkurang.

Link skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/animation-performance/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/animation-performance/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Animasi menu saya yang meluncur masuk tersendat di ponsel. Bisakah Anda memeriksa CSS saya dan membuatnya lebih mulus?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menemukan animasi yang mengubah properti tata letak, mengubahnya menjadi perubahan transform dan opacity, lalu menyarankan agar pengaturan gerakan berkurang dihormati.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Use transform and opacity for animations

Animating layout properties (width, height, top, margin) triggers the full browser rendering pipeline on every frame — style recalculation, layout, paint, and composite. This runs on the main thread and competes with JavaScript. Animating transform and opacity skips layout and paint entirely and runs on a dedicated GPU thread, achieving smooth 60fps even when the main thread is busy.

Quick Reference

  • Only transform and opacity can be composited on the GPU without triggering layout
  • Use will-change: transform sparingly to promote an element to its own compositor layer
  • Prefer CSS transitions and animations over JavaScript animation libraries for simple effects
  • Respect prefers-reduced-motion to disable animations for users who need it

Check

Find CSS animations or transitions in this file that animate layout-triggering properties like top, left, width, height, or margin. Flag them for optimization.

Fix

Convert layout-triggering animations to use transform equivalents: position changes to translate(), size changes to scale().

Explain

Explain the browser rendering pipeline, why transform and opacity are performant for animation, and how the GPU compositor works.

Code Review

Review stylesheets, component styles, and responsive states related to Use transform and opacity for animations. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/animation-performance

Pertanyaan umum

Mengapa transform dan opacity lebih mulus?

Skill menyatakan keduanya dapat ditangani oleh prosesor grafis tanpa memicu tata letak dan pengecatan ulang di setiap frame.

Apa fungsi will-change?

Skill menyarankan memakainya secukupnya, untuk memberi elemen lapisan rendering sendiri.

Apakah saya sebaiknya memakai pustaka untuk efek sederhana?

Skill menyarankan transisi dan animasi CSS untuk efek sederhana, dibanding pustaka animasi JavaScript.

Detail

Deskripsi asli dari pembuat

Use when reviewing stylesheets, component styles, and responsive behavior related to Use transform and opacity for animations. Check the rendered layout across breakpoints and interaction states before proposing a fix.

repo: thedaviddias/Front-End-Checklist

Popularitas

Bintang GitHub
75k
Peringkat
#2722
Lisensi
MIT
Diperbarui
31/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa