원클릭으로
gsap-animations
GSAP + ScrollTrigger - animateInOnEnter, getMainScroller, useGsapAnimations. Use when adding enter/scroll animations.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
GSAP + ScrollTrigger - animateInOnEnter, getMainScroller, useGsapAnimations. Use when adding enter/scroll animations.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Global Pinia store (useAppStore) for theme and language with cookie persistence. Use when changing theme or language, or touching app/stores/app.ts.
Create/edit blog articles in EN/ES - frontmatter, collections, images, Markdown features. Use when writing content under content/{en,es}/blog/.
Auto-imported global and content components plus layouts (default/blog). Use when using/creating components or working with ContentRenderer.
Project composables - useBlog, usePageSeo, useEnterAnimations, useBlogScroll, useGsapAnimations. Use when consuming blog/SEO/animation logic.
CSS custom properties, utility classes and theme colors. Use when editing styles, working in app/assets/styles/*, writing <style scoped>, or touching colors, spacing or typography.
Static data - contact.ts, projects.ts, sidebar-items.ts. Use when displaying contact/projects info or adding navigation items.
| name | gsap-animations |
| description | GSAP + ScrollTrigger - animateInOnEnter, getMainScroller, useGsapAnimations. Use when adding enter/scroll animations. |
GSAP + ScrollTrigger plugin and animation composables for the project.
app/plugins/gsap.ts - plugin, exports and helpersapp/composables/useEnterAnimations.ts - animation composables (see the composables skill)import {
gsap,
ScrollTrigger,
getMainScroller, // () => HTMLElement | null
animateInOnEnter, // ScrollTrigger helper
isElementInViewport, // (el, scroller?) => boolean
clearGSAPProps, // (elements) => void
gsapDefaults, // { ease: 'power3.out', duration: 0.8, clearProps: 'opacity,transform' }
scrollTriggerDefaults, // { start: 'top 80%', once: true }
} from '~/plugins/gsap'
const scroller = getMainScroller()
// default layout → document.querySelector('.shell-main')
// blog layout → document.querySelector('.blog-main')
// SSR → null
ScrollTrigger.defaults({ scroller }) is configured automatically in app:mounted and page:finish.
type AnimateInOnEnterOptions = {
from?: gsap.TweenVars // initial state (applied if the element is not in viewport)
to?: gsap.TweenVars // final state (include ease, duration, etc.)
trigger?: HTMLElement | null
scroller?: HTMLElement | null
start?: string // default: 'top 80%'
once?: boolean // default: true
}
animateInOnEnter(element, {
from: { opacity: 0, y: 30 },
to: { ...gsapDefaults, opacity: 1, y: 0 },
scroller: getMainScroller(),
start: 'top 80%',
once: true,
})
If the element is already visible in the viewport, from is ignored and it is cleared directly.
const gsapDefaults = {
ease: 'power3.out',
duration: 0.8,
clearProps: 'opacity,transform',
}
See the composables skill → useEnterAnimations() section.
<script setup>
const { label, titleEl, descriptionEl, setPanelRef, setupEnterAnimations, cleanupEnterAnimations } = useEnterAnimations()
onMounted(() => nextTick(() => setupEnterAnimations()))
onUnmounted(() => cleanupEnterAnimations())
</script>
See the composables skill → useGsapAnimations() section. Automatic cleanup in onBeforeUnmount.
const { setupAnimations } = useGsapAnimations()
onMounted(() => {
nextTick(() => {
setupAnimations(() => {
const scroller = getMainScroller()
gsap.from('.my-element', {
...gsapDefaults,
opacity: 0, y: 20,
scrollTrigger: {
trigger: '.my-element',
scroller,
start: 'top 80%',
once: true,
}
})
})
})
})
?gsapDebug=1localStorage.setItem('gsap:debug', '1')[gsap] logs in the console with setup, fallback and animation eventsonMounted or import.meta.clientuseGsapAnimations() or useEnterAnimations() (they create gsap.context() for cleanup)setupAnimations inside nextTick() within onMounted (layout ready)ScrollTrigger.refresh()gsap.set() with clearProps before hydration (causes SSR mismatch)