Index of every page on this site: llms.txt
All skills
onmax avatar

/nanime

@b4e1a3f official
by Maxonmax/nuxt-skills729 stars
38
Run it yourself

Build animations in a Nuxt app with nanime, the Nuxt module wrapping Anime.js v4. Use when animating elements, text, SVG or scroll in Nuxt: useAnimate, useWaapiAnimate, useAnimatable, useAnimeTimeline, useDraggable, useSplitText, useScrambleText, useAnimeScroll, useAnimeLayout, <AnimeTransition>, <AnimeTransitionGroup>, <AnimeLayoutGroup>, transition styles, component defaults, provideAnimeDefaults and the #nanime/* aliases. Also use when an effect seems to need raw animejs, GSAP or CSS transition classes. Most mistakes here do not throw; they animate the wrong thing.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/nanime

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencestimelines.md

≈609 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Timelines, split text, SVG and scroll

Timeline methods can be called in setup

useAnimeTimeline() returns a buffered proxy. .add(), .set(), .label(), .play() and the rest queue until the timeline exists after mount, then replay. No onMounted or watch needed.

const { chars } = useSplitText(heading, { chars: true })
const tl = useAnimeTimeline({ autoplay: false })

tl.add(chars, { opacity: [0, 1] }, 0)   // chars is still [] here, which is fine

Scroll-driven timeline

const scroll = useAnimeScroll(() => ({ target: section.value ?? undefined, sync: true }))
const tl = useAnimeTimeline({ autoplay: scroll })

Bind through autoplay, which nanime unwraps to the observer. Don't call scroll.link(tl): it hands Anime.js the proxy itself.

SVG helpers need a real element

Composable targets accept refs. createDrawable, morphTo and createMotionPath from #nanime/proxies/svg do not: they read the element right away, and in top-level setup the ref is still null.

createDrawable returns an array. Take [0]: a ref holding an array is not an array of refs, and targets don't accept it.

Outside a timeline, wrap it in a computed:

const drawable = computed(() => path.value ? createDrawable(path.value)[0] : null)
useAnimate(drawable, { draw: ['0 0', '0 1'], duration: 1000 })

In a timeline, add inside onMounted:

onMounted(() => {
  if (!path.value || !shape.value) return
  const [drawable] = createDrawable(path.value)
  if (!drawable) return
  tl.add(drawable, { draw: ['0 0', '0 1'], duration: 1000 }, 0)
    .add(path.value, { d: morphTo(shape.value), duration: 800 }, 1000)
})

Timing that looks right but traces wrong

These come from Anime.js, not nanime:

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts18d3 checks · Risk SAFE
  • Gen Agent Trust Hub18d

    The skill provides instructions for using the nanime Nuxt module. It is generally safe but identifies an indirect prompt injection surface through animation tools that process dynamic data without explicit sanitization requirements.

  • Socket18d

    No alerts

  • Snyk18d

    Risk: LOW · No issues

Signed by skilld at b4e1a3f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 15 hours ago.

Activeupdated 3 weeks ago

README badge

README badge for onmax/nuxt-skills/nanime