Communitygithub.com

MengTo/Skills

IntersectionObserver를 사용하여 스크롤 시 애니메이션을 트리거하고 Tailwind 친화적인 애니메이션 클래스와 키프레임을 제공합니다. 스크롤 리빌, 애니메이션 온 스크롤, 요소가 뷰포트에 진입할 때 순차 애니메이션을 요청할 때 사용하세요.

Skills란 무엇인가요?

이 스킬은 웹 개발자가 IntersectionObserver API를 활용하여 스크롤 시 요소가 뷰포트에 들어올 때 애니메이션을 실행하는 방법을 제공합니다. Tailwind CSS와 자연스럽게 통합되도록 설계되었으며, 미리 정의된 애니메이션 클래스(`animate-on-scroll`)와 키프레임(`animationIn`)을 포함하고 있어 별도의 설정 없이 바로 사용할 수 있습니다. 주요 기능으로는 애니메이션의 한 번 실행 또는 반복 실행 여부, 임계값(threshold), 마진(margin), 지속 시간, 지연 시간, 변형(transform) 및 블러(blur) 값을 쉽게 조정할 수 있는 사용자 정의 옵션을 제공합니다. Cursor, Claude Code, Codex 등 AI 에이전트 플랫폼에서 이 스킬을 호출하면 개발자가 명확한 사양 없이도 인터랙티브한 스크롤 애니메이션을 빠르게 구현할 수 있도록 지원합니다. 워크플로는 간단합니다: 애니메이션 스타일과 타이밍을 확인하고, 키프레임과 JS 옵저버 스니펫을 제공한 후 Tailwind 클래스를 적용하면 됩니다. 일반적인 실수로는 키프레임을 JS 앞에 포함하지 않거나, 키프레임 이름이 Tailwind 애니메이션 참조와 일치하지 않는 경우가 있으므로 주의해야 합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/MengTo/Skills/tree/HEAD/agent-skills/web-design/animation-on-scroll

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

스크롤 애니메이션 스킬

워크플로

  1. 애니메이션 스타일, 타이밍, 한 번 실행 또는 반복 실행 여부를 확인합니다.
  2. 키프레임 + JS 옵저버 스니펫과 적용할 정확한 Tailwind 클래스를 제공합니다.
  3. 임계값(threshold), rootMargin, 지속 시간(duration), 지연 시간(delay), transform/blur 값만 집중적으로 조정합니다.

사용 체크리스트

  • JS 스니펫을 <head> 내 키프레임 뒤에 삽입합니다.
  • 요소에 애니메이션 클래스와 animate-on-scroll을 추가합니다.
  • 키프레임 이름이 Tailwind 애니메이션 참조와 일치하는지 확인합니다.

IntersectionObserver 트리거

<script>
  /*
    스크롤 시 가시화되는 순차 애니메이션. 애니메이션 키프레임 필요. 사용법:

    1) 이 코드를 애니메이션 키프레임 코드와 함께 <head>에 삽입합니다.

    2) Tailwind 클래스에 추가: [animation:animationIn_0.8s_ease-out_0.1s_both] animate-on-scroll
  */
  (function () {
    // 일시 정지/실행 상태를 위한 CSS 주입
    const style = document.createElement("style");
    style.textContent = `
      /* 기본값: 일시 정지 */
      .animate-on-scroll { animation-play-state: paused !important; }
      /* JS에 의해 활성화 */
      .animate-on-scroll.animate { animation-play-state: running !important; }
    `;
    document.head.appendChild(style);

    const once = true;

    if (!window.__inViewIO) {
      window.__inViewIO = new IntersectionObserver((entries) => {
        entries.forEach((entry) => {
          if (entry.isIntersecting) {
            entry.target.classList.add("animate");
            if (once) window.__inViewIO.unobserve(entry.target);
          }
        });
      }, { threshold: 0.2, rootMargin: "0px 0px -10% 0px" });
    }

    window.initInViewAnimations = function (selector = ".animate-on-scroll") {
      document.querySelectorAll(selector).forEach((el) => {
        window.__inViewIO.observe(el); // 중복 관찰은 무시됨
      });
    };

    document.addEventListener("DOMContentLoaded", () => initInViewAnimations());
  })();
</script>

키프레임

<style>
  /*
    순차 애니메이션 인트로. 사용법:

    1) 이 코드를 <head>에 삽입합니다.

    2) Tailwind 클래스에 추가: [animation:animationIn_0.8s_ease-out_0.1s_both]
  */
  @keyframes animationIn {
    0% {
      opacity: 0;
      transform: translateY(30px);
      filter: blur(8px);
    }

    100% {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0px);
    }
  }
</style>

Tailwind 예시

<div class="animate-on-scroll [animation:animationIn_0.8s_ease-out_0.1s_both]">
  ...
</div>

사용자 정의 옵션

  • 트리거: threshold와 rootMargin을 조정하여 더 일찍/늦게 표시합니다.
  • 반복: once = false로 설정하여 요소가 다시 진입할 때 재생할 수 있습니다.
  • 모션: 키프레임에서 translateY와 blur를 조정합니다.
  • 타이밍: Tailwind 애니메이션 값에서 지속 시간(duration)과 지연 시간(delay)을 변경합니다.

일반적인 실수

  • JS 스니펫 앞에 키프레임을 포함하지 않은 경우.
  • Tailwind 애니메이션에서 사용한 키프레임 이름과 다른 이름을 사용한 경우.
  • 옵저버 초기화 전에 요소가 이미 뷰포트에 있어 애니메이션이 실행되지 않는 경우.

사양이 누락되었을 때 질문할 사항

  • 애니메이션은 한 번 실행되어야 합니까, 아니면 요소가 다시 진입할 때마다 실행되어야 합니까?
  • 뷰포트에 진입하기 전에 얼마나 미리 시작해야 합니까?
  • 어떤 모션 스타일(페이드, 슬라이드, 블러, 스케일)을 원하십니까?

Individual skills in this repo

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

MengTo/Skills

Create polished 60 fps 4:3 4K browser screen-recording style videos from Codex in-app browser captures, with browser-only crop, natural macOS cursor styling, deliberate click choreography, zoom-follow framing, ffprobe/thumbnail verification, and optional native recording compatibility checks. Use when the user asks to record or re-record browser actions, show cursor clicks and zooms, make Dribbble/UI inspiration or product demo recordings, or asks whether Codex, Playwright, or an MCP can produce a natural browser demo video.

MengTo/Skills

Generate ElevenLabs text-to-speech audio from scripts or inline text using local voice profiles. Use when the user asks for ElevenLabs, text-to-speech, TTS, narration, voiceover, speech audio, or voice generation; load voice names, voice ids, emails, owners, and account-specific defaults only from local config outside the skill.

MengTo/Skills

Profile, audit, and optimize frontend page performance with emphasis on animation work, memory-leak risks, long-session slowdowns, CSS animations, canvas/WebGL requestAnimationFrame loops, marquees, skeletons, GSAP/Three/Matter effects, timers, listeners, and observers. Use when the user asks to make animations performant, pause offscreen animations, look for memory leaks, profile pages that slow the computer over time, fix janky scrolling, reduce CPU/GPU use, or repeat the "only play in view" optimization on React/Vite/Next/frontend pages using Codex Browser.

MengTo/Skills

Turn a reference video into a super detailed recreation or inspiration prompt. Use when the user provides, mentions, uploads, links, or points to a video and asks to analyze the design, UI, animations, transitions, scroll interactions, typography, colors, assets, WebGL/Three.js, storytelling, section-by-section behavior, or to create a prompt/article that recreates the page, app, interaction, or motion system.

MengTo/Skills

Use when designing or implementing product-grade web motion like Stripe, Linear, Apple, and Vercel. Covers motion principles, easing/duration defaults, choreography patterns, scroll/hover interactions, performance, accessibility (reduced motion), and implementation guidance.

MengTo/Skills

Create premium cinematic web motion systems with GSAP, ScrollTrigger, and Lenis. Use for luxury editorial websites, creative studio portfolios, Awwwards-style interactions, smooth scroll reveals, staggered text, parallax, pinned sections, magnetic hover states, custom cursors, and mouse-reactive layered movement.

MengTo/Skills

Create cinematic scroll-driven landing pages with Lenis smooth scrolling, GSAP ScrollTrigger, scroll-linked progression, staggered text reveals, sticky card stacks, parallax backgrounds, scroll-scrubbed transitions, footer reveals, and immersive preloaders. Use when analyzing or building premium editorial scroll experiences, sticky project stacks, kinetic typography, or section-by-section storytelling.

MengTo/Skills

Use when designing or rewriting a high-converting SaaS pricing page (structure, plan design, copywriting, SEO/AEO, FAQs, layout patterns, experiments). Includes checklists, templates, and common pitfalls.

MengTo/Skills

Use when creating or refining WebGL-heavy landing pages and you need to steer toward a specific visual outcome (premium, technical, playful, cinematic) while balancing conversion clarity, performance, and implementation complexity.

관련 스킬