Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@hypernym/nuxt-gsap
Advanced tools
GSAP module for Nuxt.
@hypernym/nuxt-gsap
to your projectnpm i -D @hypernym/nuxt-gsap
// nuxt.config.ts
{
modules: ['@hypernym/nuxt-gsap']
}
That's it! Start developing your app!
The module comes with a zero-config setup so after activation it automatically adds the GSAP core and it is globally available without additional settings.
<!-- layout.vue | page.vue | component.vue -->
<template>
<div>
<h1 class="title">Nuxt Gsap</h1>
</div>
</template>
<script setup lang="ts">
const { $gsap } = useNuxtApp()
onMounted(() => {
$gsap.to('.title', { rotation: 3, x: 100, duration: 1 })
})
</script>
Nuxt Gsap Module is completely rewritten in TypeScript. It also improves the development experience with detailed descriptions, examples and code auto-completion.
After plugin activation, it is immediately available globally, so there is no need to manually import or register.
// nuxt.config.ts
{
modules: ['@hypernym/nuxt-gsap'],
gsap: {
// Module options
}
}
GSAP core is enabled by default on module activation.
// nuxt.config.ts
{
modules: ['@hypernym/nuxt-gsap'],
}
Available globally
const { $gsap } = useNuxtApp()
$gsap.to('.box', { rotation: 27, x: 100, duration: 1 })
Specifies GSAP extra plugins.
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
flip: true
}
}
}
Available globally
const { $Flip } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
scrollTrigger: true
}
}
}
Available globally
const { $ScrollTrigger } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
observer: true
}
}
}
Available globally
const { $Observer } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
scrollTo: true
}
}
}
Available globally
const { $ScrollToPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
draggable: true
}
}
}
Available globally
const { $Draggable } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
easel: true
}
}
}
Available globally
const { $EaselPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
motionPath: true
}
}
}
Available globally
const { $MotionPathPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
pixi: true
}
}
}
Available globally
const { $PixiPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraPlugins: {
text: true
}
}
}
Available globally
const { $TextPlugin } = useNuxtApp()
Specifies GSAP extra eases.
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraEases: {
expoScale: true
}
}
}
Available globally
const { $ExpoScaleEase } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraEases: {
rough: true
}
}
}
Available globally
const { $RoughEase } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraEases: {
slowMo: true
}
}
}
Available globally
const { $SlowMo } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
extraEases: {
custom: true
}
}
}
Available globally
const { $CustomEase } = useNuxtApp()
object[]
undefined
Provides an easy way to register global effects.
Once the effect is registered, it can be accessed directly on the gsap.effects
object.
To avoid possible linting warnings, use // eslint-disable-next-line
and // @ts-ignore
comments.
// nuxt.config.ts
{
gsap: {
registerEffects: [
{
name: 'fade',
defaults: {
y: -100,
opacity: 0,
duration: 2
},
// eslint-disable-next-line
// @ts-ignore
effect: (targets, config) => {
return gsap.to(targets, {
y: config.y,
opacity: config.opacity,
duration: config.duration
})
}
},
{
name: 'slideIn'
// ...
}
]
}
}
Available globally
const { $gsap } = useNuxtApp()
$gsap.effects.fade('.class')
$gsap.effects.slideIn('#id')
object[]
undefined
Provides an easy way to register global eases.
Once the ease is registered, it can be accessed directly on the gsap
animations.
// nuxt.config.ts
{
gsap: {
registerEases: [
{
name: 'customEase',
ease: progress => {
return progress // linear
}
},
{
name: 'customEase2'
// ...
}
]
}
}
Available globally
const { $gsap } = useNuxtApp()
$gsap.to('.class', { x: 100, ease: 'customEase' })
$gsap.to('#id', { x: 200, ease: 'customEase2' })
Specifies GSAP premium plugins.
This is only available to club members as it requires a paid license.
Keep in mind that premium plugins must be installed according to the official GSAP guidelines before use.
For more information about club plugins, check the official pages.
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
drawSvg: true
}
}
}
Available globally
const { $DrawSVGPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
scrollSmoother: true
}
}
}
Available globally
const { $ScrollSmoother } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
gsDevTools: true
}
}
}
Available globally
const { $GSDevTools } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
inertia: true
}
}
}
Available globally
const { $InertiaPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
morphSvg: true
}
}
}
Available globally
const { $MorphSVGPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
motionPathHelper: true
}
}
}
Available globally
const { $MotionPathHelper } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
physics2d: true
}
}
}
Available globally
const { $Physics2DPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
physicsProps: true
}
}
}
Available globally
const { $PhysicsPropsPlugin } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
scrambleText: true
}
}
}
Available globally
const { $ScrambleText } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
splitText: true
}
}
}
Available globally
const { $SplitText } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
customBounce: true
}
}
}
Available globally
const { $CustomBounce } = useNuxtApp()
boolean
undefined
// nuxt.config.ts
{
gsap: {
clubPlugins: {
customWiggle: true
}
}
}
Available globally
const { $CustomWiggle } = useNuxtApp()
Feel free to use the official discussions for any additional questions.
More details about GSAP licenses can be found in the official repository.
Developed in 🇭🇷 Croatia
Released under the MIT license.
© Hypernym Studio
FAQs
GSAP module for Nuxt.
The npm package @hypernym/nuxt-gsap receives a total of 1,347 weekly downloads. As such, @hypernym/nuxt-gsap popularity was classified as popular.
We found that @hypernym/nuxt-gsap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.