Communitygithub.com

FerroxLabs/murage

Experiência em animações web, abrangendo animações e transições CSS, GSAP, Framer Motion, animações acionadas por rolagem, otimização de desempenho, coreografia de animações, funções de easing, acessibilidade de movimento reduzido e padrões de design de animação.

O que é murage?

A habilidade **Web Animation Master** (FerroxLabs/murage) é um guia completo para desenvolvedores que desejam criar animações web de alto desempenho, acessíveis e visualmente polidas. Ela fornece um framework de decisão para saber quando e como animar, orientando a escolha entre técnicas CSS puras (transições e keyframes) e bibliotecas JavaScript como GSAP e Framer Motion. A habilidade cobre desde conceitos fundamentais, como funções de easing e otimização de desempenho (animando apenas propriedades compostadas por GPU), até tópicos avançados como coreografia com timelines do GSAP, animações acionadas por rolagem (ScrollTrigger) e animações de layout com Framer Motion (FLIP). Um destaque importante é a ênfase em acessibilidade, com práticas recomendadas para respeitar a preferência de movimento reduzido do usuário (`prefers-reduced-motion`) e evitar armadilhas comuns que causam desconforto ou problemas de desempenho. A habilidade é útil para qualquer desenvolvedor front-end, designers de UI/UX e engenheiros de software que buscam implementar animações web profissionais, seja em projetos simples com CSS ou em aplicações React complexas com Framer Motion e GSAP.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/FerroxLabs/murage/tree/HEAD/skills-library/web-animation-master

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Mestre em Animações Web

Você é um desenvolvedor especialista em animações web que cria animações performáticas, acessíveis e visualmente polidas. Uma boa animação é invisível — ela guia a atenção do usuário, comunica mudanças de estado e faz as interfaces parecerem responsivas. Uma animação ruim é distrativa, com engasgos e enjoativa. A diferença está em entender as restrições de desempenho, o timing e a moderação.

Framework de Decisão para Animações

Quando Animar

PropósitoAnimarExemplo
Feedback de mudança de estadoSimPressionar botão, alternar interruptor, envio de formulário
Continuidade espacialSimTransições de página, painéis expansíveis, abertura/fechamento de modal
Chamar atençãoCom moderaçãoSelo de nova notificação, call-to-action importante
Indicação de carregamentoSimTelas esqueleto, barras de progresso, spinners
Encantamento/marcaCom moderaçãoAnimação de logotipo, sequência de onboarding
Apenas decoraçãoNãoAnimações de fundo gratuitas, abuso de parallax

Seleção de Tecnologia

O que você está construindo?

├── Efeitos simples de hover/foco/estado
│   └── Transições CSS (sem necessidade de JS)
│
├── Animações de keyframe/loop
│   └── @keyframes CSS (sem necessidade de JS)
│
├── Animações de componentes React
│   ├── Animações de layout, gestos, animações de saída
│   │   └── Framer Motion (específico para React, declarativo)
│   └── Linhas do tempo complexas, acionadas por rolagem, FLIP
│       └── GSAP (agnóstico a frameworks, mais poderoso)
│
├── Animações acionadas por rolagem
│   ├── Revelar ao rolar simples
│   │   └── Animações CSS acionadas por rolagem (navegadores modernos)
│   └── Linhas do tempo complexas vinculadas à rolagem
│       └── GSAP ScrollTrigger
│
└── Animações SVG / canvas / WebGL
    ├── Desenho de caminho SVG, morphing
    │   └── GSAP + MotionPathPlugin
    └── 3D, partículas, shaders
        └── Three.js / PixiJS / WebGL diretamente

Animações CSS

Transições (Estado A para Estado B)

/* REGRA: Apenas transicione propriedades que são baratas de animar */
.button {
  /* Barato: transform, opacity (compostado por GPU, sem layout/paint) */
  transform: scale(1);
  opacity: 1;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}

.button:hover {
  transform: scale(1.05);
}

.button:active {
  transform: scale(0.97);
}

/* ANTI-PADRÃO: Animando propriedades de layout */
.card-bad {
  width: 200px;
  /* Isso aciona recálculo de layout a cada quadro = engasgo */
  transition: width 300ms ease;
}
.card-bad:hover {
  width: 250px;  /* EVITAR: causa thrashing de layout */
}

/* MELHOR: Use transform: scale() */
.card-good {
  transition: transform 300ms ease;
}
.card-good:hover {
  transform: scaleX(1.25);  /* Compostado por GPU, suave */
}

Animações com Keyframes

/* Pulso de carregamento esqueleto */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.skeleton {
  background: #e0e0e0;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Deslizar da direita */
@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification {
  animation: slide-in 300ms ease-out forwards;
}

/* Itens de lista escalonados (usando propriedades customizadas) */
.list-item {
  animation: fade-up 400ms ease-out backwards;
  animation-delay: calc(var(--index) * 60ms);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}
<ul>
  <li class="list-item" style="--index: 0">Item 1</li>
  <li class="list-item" style="--index: 1">Item 2</li>
  <li class="list-item" style="--index: 2">Item 3</li>
</ul>

Funções de Easing

Easings Comuns e Quando Usá-los

EasingValor CSSUsar Para
ease-outcubic-bezier(0, 0, 0.2, 1)Entradas (elemento aparecendo)
ease-incubic-bezier(0.4, 0, 1, 1)Saídas (elemento desaparecendo)
ease-in-outcubic-bezier(0.4, 0, 0.2, 1)Movendo entre posições
linearlinearMudanças de opacidade, mudanças de cor, barras de progresso
springPersonalizado ou GSAPAnimações interativas/com sensação física
bounceKeyframes personalizadosUI lúdica, notificações

Referência de Easing Personalizado

--ease-standard: cubic-bezier(0.2, 0, 0, 1);          /* Propósito geral */
--ease-decelerate: cubic-bezier(0, 0, 0, 1);           /* Elementos entrando */
--ease-accelerate: cubic-bezier(0.3, 0, 1, 1);         /* Elementos saindo */
--ease-overshoot: cubic-bezier(0.34, 1.56, 0.64, 1);   /* Bounce lúdico */

GSAP (GreenSock Animation Platform)

Uso Básico do GSAP

import gsap from 'gsap';

// Animar PARA valores alvo
gsap.to('.box', {
  x: 200,
  y: 100,
  rotation: 360,
  scale: 1.5,
  opacity: 0.8,
  duration: 1,
  ease: 'power2.out',
});

// Animar DE valores para o estado atual
gsap.from('.hero-title', {
  y: 60,
  opacity: 0,
  duration: 0.8,
  ease: 'power3.out',
});

// Escalonar múltiplos elementos
gsap.from('.card', {
  y: 40,
  opacity: 0,
  duration: 0.6,
  stagger: 0.1,         // 100ms entre cada card
  ease: 'power2.out',
});

Timeline GSAP (Coreografia)

const tl = gsap.timeline({
  defaults: { duration: 0.5, ease: 'power2.out' },
});

tl.from('.hero-bg', { scale: 1.1, opacity: 0, duration: 1 })
  .from('.hero-title', { y: 40, opacity: 0 }, '-=0.3')      // Começa 0.3s antes do anterior terminar
  .from('.hero-subtitle', { y: 30, opacity: 0 }, '-=0.2')
  .from('.hero-cta', { scale: 0.8, opacity: 0 }, '-=0.1')
  .from('.hero-image', { x: 60, opacity: 0, duration: 0.8 }, '-=0.4');

// Controlar a timeline
tl.play();
tl.pause();
tl.reverse();
tl.seek(0.5);   // Pular para 0.5 segundos
tl.timeScale(2); // Velocidade 2x

GSAP ScrollTrigger

import gsap from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
gsap.registerPlugin(ScrollTrigger);

// Simples: animar quando o elemento entra no viewport
gsap.from('.feature-card', {
  scrollTrigger: {
    trigger: '.feature-card',
    start: 'top 80%',        // Quando o topo do elemento atinge 80% do viewport
    end: 'bottom 20%',
    toggleActions: 'play none none reverse',
    // onEnter  onLeave  onEnterBack  onLeaveBack
  },
  y: 60,
  opacity: 0,
  duration: 0.8,
  stagger: 0.15,
});

// Seção fixa com scrub (vinculada à rolagem)
gsap.to('.horizontal-section', {
  scrollTrigger: {
    trigger: '.horizontal-wrapper',
    pin: true,                // Fixar o wrapper enquanto rola
    scrub: 1,                 // Atraso suave de 1 segundo em relação à rolagem
    start: 'top top',
    end: '+=3000',            // Rolagem de 3000px para completar a animação
  },
  x: '-300%',                 // Deslizar 4 painéis para a esquerda
  ease: 'none',
});

Framer Motion (React)

Animações Básicas

import { motion } from 'framer-motion';

// Animar na montagem
function FadeIn({ children }) {
  return (
    <motion.div
      initial={{ opacity: 0, y: 20 }}
      animate={{ opacity: 1, y: 0 }}
      transition={{ duration: 0.4, ease: 'easeOut' }}
    >
      {children}
    </motion.div>
  );
}

// Animar no hover e tap
function AnimatedButton() {
  return (
    <motion.button
      whileHover={{ scale: 1.05 }}
      whileTap={{ scale: 0.95 }}
      transition={{ type: 'spring', stiffness: 400, damping: 17 }}
    >
      Clique em mim
    </motion.button>
  );
}

Animações de Layout (FLIP)

import { motion, AnimatePresence } from 'framer-motion';

function TodoList({ items, onRemove }) {
  return (
    <ul>
      <AnimatePresence>
        {items.map((item) => (
          <motion.li
            key={item.id}
            layout                           // Animar automaticamente mudanças de posição
            initial={{ opacity: 0, x: -20 }}
            animate={{ opacity: 1, x: 0 }}
            exit={{ opacity: 0, x: 20, height: 0 }}  // Animar na remoção
            transition={{
              layout: { type: 'spring', stiffness: 300, damping: 30 },
              opacity: { duration: 0.2 },
            }}
          >
            {item.text}
            <button onClick={() => onRemove(item.id)}>Remover</button>
          </motion.li>
        ))}
      </AnimatePresence>
    </ul>
  );
}

Variantes (Filhos Orquestrados)

const container = {
  hidden: { opacity: 0 },
  show: {
    opacity: 1,
    transition: {
      staggerChildren: 0.08,
      delayChildren: 0.2,
    },
  },
};

const item = {
  hidden: { opacity: 0, y: 20 },
  show: { opacity: 1, y: 0 },
};

function StaggeredList({ items }) {
  return (
    <motion.ul variants={container} initial="hidden" animate="show">
      {items.map((i) => (
        <motion.li key={i.id} variants={item}>
          {i.text}
        </motion.li>
      ))}
    </motion.ul>
  );
}

Otimização de Desempenho

A Lista de Verificação de Composição

BARATO DE ANIMAR (compostado por GPU, sem layout ou paint):
  ✓ transform (translate, scale, rotate)
  ✓ opacity
  ✓ filter (blur, brightness, etc.)
  ✓ clip-path (na maioria dos navegadores)

CARO DE ANIMAR (aciona layout ou paint):
  ✗ width, height, top, left, right, bottom
  ✗ margin, padding
  ✗ border-width, border-radius
  ✗ font-size
  ✗ box-shadow (aciona paint)

TÉCNICA: Substituir propriedades caras por equivalentes de transform
  mudança de width    -> transform: scaleX()
  mudança de height   -> transform: scaleY()
  mudança de top/left -> transform: translate()
  visibilidade        -> opacity: 0/1

Depurando Desempenho

// Chrome DevTools: Painel Performance
// 1. Grave enquanto a animação é reproduzida
// 2. Procure por quadros longos (>16.6ms para 60fps)
// 3. Verifique a aba "Rendering": ative "Paint flashing" para ver repaints

// Forçar composição por GPU (usar com moderação)
.animated-element {
  will-change: transform, opacity;  /* Dica para o navegador: promover para própria camada */
  /* Remova will-change após a animação completar para liberar memória da GPU */
}

// Medir taxa de quadros no código
let frames = 0;
let lastTime = performance.now();
function countFrames() {
  frames++;
  const now = performance.now();
  if (now - lastTime >= 1000) {
    console.log(`FPS: ${frames}`);
    frames = 0;
    lastTime = now;
  }
  requestAnimationFrame(countFrames);
}
countFrames();

Visibilidade de Conteúdo para Elementos Fora da Tela

/* Não renderizar seções fora da tela até que sejam necessárias */
.section {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

Acessibilidade

Respeitando Movimento Reduzido

/* Sempre fornecer alternativas de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Ou desabilitar seletivamente apenas animações não essenciais */
@media (prefers-reduced-motion: reduce) {
  .decorative-animation { animation: none; }
  .page-transition { transition: opacity 0.1ms; } /* Instantâneo, mas ainda aciona eventos */
  /* Manter animações funcionais como spinners de carregamento */
}
// GSAP: Verificar preferência do usuário
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

if (prefersReducedMotion) {
  gsap.globalTimeline.timeScale(20); // Animações quase instantâneas
}

// Framer Motion: Suporte nativo
import { useReducedMotion } from 'framer-motion';

function Component() {
  const shouldReduceMotion = useReducedMotion();
  return (
    <motion.div
      animate={{ x: 100 }}
      transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.5 }}
    />
  );
}

Regras de Acessibilidade para Animações

  1. Nunca anime conteúdo que transmita informações apenas através de movimento (alguns usuários não o verão)
  2. Forneça controles de pausa/parada para animações com duração superior a 5 segundos
  3. Evite piscar mais de 3 vezes por segundo (risco de convulsão, WCAG 2.3.1)
  4. Não use animação como a única forma de transmitir significado (por exemplo, um campo de formulário tremendo também deve mostrar uma mensagem de erro)

Anti-Padrões Comuns

  1. Animando propriedades de layout: width, height, top, left causam thrashing de layout. Use transform.

  2. Muitas camadas will-change: Cada elemento com will-change ganha sua própria camada de GPU. Muitas camadas consomem memória e na verdade prejudicam o desempenho.

  3. Animação por si só: Se remover a animação não prejudica a usabilidade, provavelmente ela não deveria estar lá. Toda animação deve ter um propósito.

  4. Ignorar movimento reduzido: 15-20% dos usuários têm distúrbios vestibulares ou sensibilidade a movimento. Sempre forneça alternativas prefers-reduced-motion.

  5. Animações JavaScript síncronas: Usar setInterval ou setTimeout para animações. Use requestAnimationFrame, animações CSS ou bibliotecas de animação que usam rAF internamente.

Lista de Verificação de Animação

  • Propósito da animação definido (feedback, continuidade, atenção, carregamento)
  • Tecnologia escolhida apropriada à complexidade
  • Apenas propriedades compositáveis animadas (transform, opacity)
  • Funções de easing correspondem à intenção da animação (ease-out para entradas, ease-in para saídas)
  • Media query prefers-reduced-motion implementada
  • Duração apropriada (100-300ms para microinterações, 300-500ms para transições)
  • Nenhum conteúdo piscando mais de 3 vezes por segundo
  • Desempenho testado no DevTools (60fps consistentes)
  • Animações não bloqueiam a interação do usuário
  • Estados de carregamento usam telas esqueleto ou animações sutis, não spinners em todo lugar

Quando Usar

Use esta habilidade quando:

  • Projetando ou implementando soluções de mestre de animação web
  • Revisando ou melhorando abordagens existentes de mestre de animação web
  • Tomando decisões arquiteturais ou de implementação sobre mestre de animação web
  • Aprendendo padrões e melhores práticas de mestre de animação web
  • Solucionando problemas relacionados a mestre de animação web

NÃO use esta habilidade quando:

  • A pergunta é sobre um domínio de tecnologia fundamentalmente diferente
  • Uma habilidade irmã mais específica cobre exatamente o tópico necessário
  • O usuário precisa de um tutorial prático completo

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

FerroxLabs/murage

Web animation expertise covering CSS animations and transitions, Web Animations API, Framer Motion, GSAP, scroll-driven animations, layout animations, spring physics, reduce-motion preferences, and performance budgets. Use when the user asks about animation designer, animation designer best practices, or needs guidance on animation designer implementation. Do NOT use when the user needs a different specialized skill or is asking about an unrelated technology domain.

FerroxLabs/murage

Writes board-level narrative updates that complement financial reports with strategic context, competitive positioning, key risks, and forward-looking guidance for board of directors audiences. Use when the user needs to write a board update, board meeting narrative, or director-level briefing. Do NOT use for stakeholder updates to management (use `stakeholder-update`), investor emails (use `investor-update-email`), or full business reports (use `business-report`).

FerroxLabs/murage

>- End-to-end workflow for building a professional photography portfolio from niche selection through shooting, editing, website creation, and client acquisition. Covers gear decisions, shooting technique, post-processing workflow, portfolio curation, online presence, and the transition from hobbyist to working photographer. Use when the user wants to build photography portfolio or needs a structured multi-step process for this goal. Do NOT use when the request is a single-step task or requires professional advice beyond educational guidance.

FerroxLabs/murage

>- End-to-end workflow for creating a high-converting SaaS landing page from copywriting through design, development, SEO optimization, and analytics setup. Covers persuasion frameworks, responsive design, performance optimization, and conversion tracking to turn visitors into customers. Use when the user wants to build saas landing page or needs a structured multi-step process for this goal. Do NOT use when the request is a single-step task or requires professional advice beyond educational guidance.

FerroxLabs/murage

Calculates startup burn rate (gross and net), projects cash runway in months, and builds scenario analysis for different spending and revenue trajectories. Use when the user asks about burn rate, cash runway, how long their money will last, or startup cash management. Do NOT use for personal savings calculations (use budget-planning), full financial modeling (use financial-model-structure), or fundraising narrative (use fundraising-narrative).

FerroxLabs/murage

The user is asking \"how long do we have,\" \"can we afford this hire,\" or \"are we running out.\" Load whenever cash, burn, or time-to-zero shows up — or when a spending decision is on the table and the user doesn't know how many months it costs.

FerroxLabs/murage

Professional corporate video production guidance covering training videos, promotional content, testimonials, and product demos. Includes client brief templates, script approval workflows, achieving professional quality on budget, brand compliance, stakeholder management, and delivery specifications. Use when the user asks about corporate video or needs help with related topics. Do NOT use for unrelated domains or when a more specialized skill exists.

FerroxLabs/murage

Helps artists, designers, and creative professionals curate, organize, and present their work through compelling portfolios across digital platforms, personal websites, and print formats for career advancement. Use when the user asks about creative portfolio builder, related techniques, best practices, or needs guidance in this domain. Do NOT use when the request is outside the scope of creative portfolio builder or requires a different specialized skill.

FerroxLabs/murage

Cross-discipline creative portfolio assessment evaluating artistic cohesion, technical skill, presentation quality, and market positioning. Produces a scored evaluation with recommendations for strengthening creative identity and professional opportunity. Use when the user asks about creative portfolio evaluator, related techniques, best practices, or needs guidance in this domain. Do NOT use when the request is outside the scope of creative portfolio evaluator or requires a different specialized skill.

FerroxLabs/murage

Professional design portfolio evaluation assessing design process, craft quality, range of work, presentation, and industry alignment. Produces a scored review with recommendations for strengthening design practice and career positioning. Use when the user asks about design portfolio reviewer, related techniques, best practices, or needs guidance in this domain. Do NOT use when the request is outside the scope of design portfolio reviewer or requires a different specialized skill.

FerroxLabs/murage

Teaches specific named emotional regulation techniques (the STOP technique, urge surfing, cognitive reframing, emotional labeling, opposite action, and physiological soothing) with step-by-step sequences. Gathers the user's emotional challenges and triggers, then produces a personalized regulation toolkit with technique instructions and a situation-response plan. Use when the user asks about managing emotions, controlling anger, handling frustration, emotional regulation strategies, or building emotional resilience. Do NOT use for clinical emotional dysregulation treatment, personality disorder management, or replacing professional mental health support.

FerroxLabs/murage

Structures a fundraising narrative for startup investors covering traction, market size, business model, use of funds, and milestone targets using standard VC pitch structure. Use when the user asks about fundraising pitch, investor narrative, raising capital, pitch deck story, or investment memo. Do NOT use for sales pitch decks (use sales-pitch-deck), personal loan applications, grant proposals (use grant-proposal-writing), or financial model creation (use financial-model-structure).

FerroxLabs/murage

Interactive storytelling for games covering branching narratives, dialogue trees, environmental storytelling, lore design, character writing for games, quest design, player agency, world-building for interactive media, and narrative integration with game mechanics. Use when the user asks about game narrative writer or needs help with related topics. Do NOT use for unrelated domains or when a more specialized skill exists.

FerroxLabs/murage

Writes Instagram captions with a hook line, story body, hashtag strategy, and platform-optimized call-to-action. Use when the user wants to write an Instagram caption, create Instagram content, or draft text to accompany an Instagram post or reel. Do NOT use for LinkedIn posts (use `linkedin-post`), Twitter threads (use `twitter-thread`), or blog posts (use `blog-post-writing`).

FerroxLabs/murage

Produces conversion-optimized landing page copy with hero section, problem statement, solution, social proof, and CTA sections using conversion copywriting methodology. Use when the user asks to write landing page copy, create a product page, write a sales page, draft conversion copy, or write landing page text for a website. Also useful when asked to write website copy or create a page that converts visitors. Do NOT use for ad copy (use paid-ad-copy), product descriptions for e-commerce listings (use product-description), or full website content strategy (use seo-content-strategy).

FerroxLabs/murage

Guides the user through launching a professional art or creative portfolio from curation through outreach, chaining 5 atomic skills across career-development, design-creative, and writing categories. Covers physical vs. digital portfolio, platform selection, fine art vs. commercial positioning, and curated vs. comprehensive approaches. Use when the user wants to create and launch a portfolio to attract clients, galleries, or employers. Do NOT use for building a job search portfolio in non-creative fields (use land-new-job workflow), personal brand content strategy (use build-personal-brand workflow), or creating the artwork itself.

FerroxLabs/murage

>- Complete YouTube channel launch workflow from niche selection and channel strategy through video production, editing, monetization setup, community building, and personal brand development for sustainable channel growth. Use when the user wants to launch youtube channel or needs a structured multi-step process for this goal. Do NOT use when the request is a single-step task or requires professional advice beyond educational guidance.

FerroxLabs/murage

Run a section-by-section conversion teardown of one landing page — hero, value proposition, social proof, features, objection handling, CTA and footer — plus form, mobile and page-speed audits, ending in prioritised fixes split into quick wins, strategic and long-term, with A/B test hypotheses. Use when one page has traffic and is not converting. Do NOT use for a whole-site marketing audit (use market-audit), for the copy voice and awareness-stage decisions behind it (use copy-awareness-stages) or for the visual system it should sit inside (use mira-visual-system).

FerroxLabs/murage

Comprehensive motion graphics guidance covering title design, lower thirds, animated explainers, kinetic typography, logo animation, After Effects and Apple Motion workflows, design principles for motion, storyboarding for motion, and building a motion design practice. Use when the user asks about motion graphics or needs help with related topics. Do NOT use for unrelated domains or when a more specialized skill exists.

FerroxLabs/murage

Comprehensive animation guidance covering the 12 principles of animation, 2D and 3D production pipelines, tools (Blender, After Effects, Procreate, Toon Boom), frame rates, rigging, motion graphics vs character animation, and building an animation practice from concept to final render. Use when the user asks about animation creator or needs help with related topics. Do NOT use for unrelated domains or when a more specialized skill exists.

Habilidades Relacionadas