rendering-animate-svg
Wrap animated SVG elements in a div to enable hardware acceleration. Apply when animating SVG icons or elements, especially in 8-bit retro components with pixel art animations.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Wrap animated SVG elements in a div to enable hardware acceleration. Apply when animating SVG icons or elements, especially in 8-bit retro components with pixel art animations.
How to use
Zainstaluj skill rendering-animate-svg w swoim projekcie Claude/Copilot, dodając go do konfiguracji agenta lub integrując z repozytorium 8bitcn-ui.
Zidentyfikuj elementy SVG, które chcesz animować — szczególnie ikony, spinnery lub elementy pixel art w komponentach retro.
Zamiast stosować klasę animacji bezpośrednio na elemencie SVG, opakowuj SVG w element div: umieść tag svg wewnątrz div, a następnie przenieś klasę animacji (np. animate-spin, transition-transform) na div.
Dla efektów hover na ikonach retro użyj struktury: div z klasami transition-transform i hover:scale-110, wewnątrz którego umieszczasz komponent ikony SVG.
Pamiętaj, że to podejście dotyczy wszystkich transformacji CSS — nie tylko rotacji, ale też opacity, translate, scale i rotate — więc zawsze owijaj SVG w div, gdy chcesz animować te właściwości.
Przetestuj animacje w różnych przeglądarkach, aby potwierdzić, że GPU acceleration jest aktywna i animacje działają płynnie bez spadków wydajności.