motion
onmax/nuxt-skills
Production-ready Vue 3/Nuxt animation library with gestures, scroll effects, and spring physics
What is motion?
Motion Vue (motion-v) is a hardware-accelerated animation library for Vue 3 and Nuxt, ported from Framer Motion. Use it for declarative animations, gesture interactions, scroll-linked effects, and layout transitions with minimal bundle overhead.
- Declarative animations on any HTML/SVG element with initial, animate, and exit states
- Gesture-based interactions including hover, tap, and drag animations
- Scroll-linked animations that trigger when elements enter the viewport
- Layout animations and shared element transitions
- Spring physics animations with customizable stiffness and damping
- Composables like useMotionValue, useScroll, useSpring for programmatic control
How to install motion
npx skills add https://github.com/onmax/nuxt-skills --skill motion- Vue 3 or Nuxt 3 project
- pnpm/npm/yarn package manager
- For Nuxt: add motion-v/nuxt module to nuxt.config.ts
How to use motion
- 1.Install motion-v via pnpm add motion-v
- 2.For Nuxt, add motion-v/nuxt to modules in nuxt.config.ts
- 3.Import motion component from motion-v in your Vue components
- 4.Wrap elements with motion.div (or motion.button, motion.span, etc.) and define animation props
- 5.Use :initial, :animate, :exit, and :transition props for state-based animations
- 6.Add :whileHover and :whilePress for gesture interactions
- 7.Use :whileInView with :viewport for scroll-triggered animations
- 8.Load references/components.md for Motion component and gesture details, references/composables.md for useMotionValue and useScroll, or references/examples.md for animation patterns
Use cases
- Adding fade, slide, and scale animations to page transitions and component reveals
- Creating interactive button hover and press effects with spring physics
- Building scroll-triggered animations that respond to viewport visibility
- Implementing layout shift animations when DOM elements change position
- Designing gesture-driven interactions like drag-to-dismiss or swipe animations
- Vue 3 and Nuxt developers building interactive UIs
- Frontend engineers implementing micro-interactions and polish
- Designers translating motion specs into production code
- Teams prioritizing bundle size and hardware acceleration
motion FAQ
Use Motion Vue for simple declarative animations, gestures, and scroll effects. Use GSAP for complex timelines, SVG morphing, and advanced scroll-triggered sequences.
Motion Vue has minimal bundle size (~200 tokens base) and is hardware-accelerated. Load only reference files relevant to your current task to keep context efficient.
Yes. Install motion-v and @vueuse/nuxt, then add motion-v/nuxt to the modules array in nuxt.config.ts.
Declarative state animations (initial/animate/exit), gesture animations (whileHover/whilePress), scroll-linked animations (whileInView), spring physics, and layout transitions.
No. Load only files relevant to your task: components.md for Motion component and gestures, composables.md for useMotionValue and useScroll, or examples.md for patterns.
Full instructions (SKILL.md)
Source of truth, from onmax/nuxt-skills.
name: motion description: Use when adding animations with Motion Vue (motion-v) - provides motion component API, gesture animations, scroll-linked effects, layout transitions, and composables for Vue 3/Nuxt license: MIT
Motion Vue (motion-v)
Animation library for Vue 3 and Nuxt. Production-ready, hardware-accelerated animations with minimal bundle size.
Current stable: motion-v 1.x - Vue port of Motion (formerly Framer Motion)
Overview
Progressive reference for Motion Vue animations. Load only files relevant to current task (~200 tokens base, 500-1500 per sub-file).
When to Use
Use Motion Vue for:
- Simple declarative animations (fade, slide, scale)
- Gesture-based interactions (hover, tap, drag)
- Scroll-linked animations
- Layout animations and shared element transitions
- Spring physics animations
Consider alternatives:
- GSAP - Complex timelines, SVG morphing, scroll-triggered sequences
- @vueuse/motion - Simpler API, less features, smaller bundle
- CSS animations - Simple transitions without JS
Installation
# Vue 3
pnpm add motion-v
# Nuxt 3
pnpm add motion-v @vueuse/nuxt
// nuxt.config.ts - Nuxt 3 setup
export default defineNuxtConfig({
modules: ['motion-v/nuxt'],
})
Quick Reference
| Working on... | Load file |
|---|---|
| Motion component, gestures | references/components.md |
| useMotionValue, useScroll | references/composables.md |
| Animation examples, patterns | references/examples.md |
Loading Files
Consider loading these reference files based on your task:
- references/components.md - if using Motion component, gestures, or layout animations
- references/composables.md - if using useMotionValue, useScroll, useSpring, or animate()
- references/examples.md - if looking for animation patterns or inspiration
DO NOT load all files at once. Load only what's relevant to your current task.
Core Concepts
Motion Component
Render any HTML/SVG element with animation capabilities:
<script setup lang="ts">
import { motion } from 'motion-v'
</script>
<template>
<motion.div
:initial="{ opacity: 0, y: 20 }"
:animate="{ opacity: 1, y: 0 }"
:exit="{ opacity: 0, y: -20 }"
:transition="{ duration: 0.3 }"
>
Animated content
</motion.div>
</template>
Gesture Animations
<motion.button
:whileHover="{ scale: 1.05 }"
:whilePress="{ scale: 0.95 }"
:transition="{ type: 'spring', stiffness: 400 }"
>
Click me
</motion.button>
Scroll Animations
<motion.div
:initial="{ opacity: 0 }"
:whileInView="{ opacity: 1 }"
:viewport="{ once: true, margin: '-100px' }"
>
Appears on scroll
</motion.div>
Available Guidance
references/components.md - Motion component variants, animation props, gesture props, layout animations, transition configuration
references/composables.md - useMotionValue, useSpring, useTransform, useScroll, useInView, animate()
references/examples.md - External resources, component libraries, animation patterns and inspiration
Related skills
More from onmax/nuxt-skills and the wider catalog.

nuxt
Nuxt 4+ development guidance with server routes, file-based routing, middleware, and latest patterns.

nuxt-better-auth
Authentication for Nuxt 4+ with Better Auth – composables, server helpers, and route protection.

nuxt-content
Typed content collections, markdown rendering, and CMS features for Nuxt with SQL queries and NuxtStudio integration.

nuxt-modules
Create, test, and publish Nuxt modules with defineNuxtModule patterns, Kit utilities, and CI/CD automation.

nuxt-seo
Nuxt SEO meta-module for robots.txt, sitemaps, OG images, and structured data.

nuxt-studio
Use when working with Nuxt Studio, the self-hosted open-source CMS for Nuxt Content sites - provides visual editing, media management, Git-based publishing, auth providers, and AI content assistance