- Type:
boolean
- Default:
true
Provides the main $gsap
core with plugins globally.
// nuxt.config.ts
{
gsap: {
provide: true
}
}
Available globally
const { $gsap } = useNuxtApp()
$gsap.to('.class', { rotation: 3, x: 100, duration: 1 })
- Type:
boolean
- Default:
undefined
Specifies custom composables.
If enabled, allows the use of custom composables.
// nuxt.config.ts
{
gsap: {
composables: true
}
}
It is possible to use provide helper and composables in combination or separately, depending on preference.
When using only composables, it is recommended to disable global import.
// nuxt.config.ts
{
gsap: {
composables: true
provide: false // global import
}
}
- Type:
boolean
- Default:
true
Specifies the auto-import
feature.
If enabled, the composables will be available globally so there is no need to import them manually.
Since this is an opinionated feature, you can disable global auto-import
and use explicit import only where you need it.
Note
Works only if the option composables: true
is enabled.
// nuxt.config.ts
{
gsap: {
autoImport: false
}
}