MCPcopy Index your code
hub / github.com/vueuse/motion

github.com/vueuse/motion @v3.0.3

repository ↗ · DeepWiki ↗ · release v3.0.3 ↗ · Ask this repo → · + Follow
133 symbols 374 edges 86 files 14 documented · 11% updated 16mo agov3.0.3 · 2025-03-10★ 2,75146 open issues
README

🤹 @vueuse/motion

npm npm npm Netlify Status

Vue Composables putting your components in motion

  • 🏎 Smooth animations based on Popmotion
  • 🎮 Declarative API inspired by Framer Motion
  • 🚀 Plug & play with 20+ presets
  • 🌐 SSR Ready
  • 🚚 First-class support for Nuxt 3
  • ✨ Written in TypeScript
  • 🏋️‍♀️ Lightweight with <20kb bundle size

🌍 Documentation

👀 Demos

Quick Start

Let's get started by installing the package and adding the plugin.

From your terminal:

npm install @vueuse/motion

In your Vue app entry file:

import { createApp } from 'vue'
import { MotionPlugin } from '@vueuse/motion'
import App from './App.vue'

const app = createApp(App)

app.use(MotionPlugin)

app.mount('#app')

You can now animate any of your component, HTML or SVG elements using v-motion.

<template>



</template>

To see more about how to use directives, check out Directive Usage.

To see more about what properties you can animate, check out Motion Properties.

To see more about how to create your own animation styles, check out Transition Properties.

To see more about what are variants and how you can use them, check out Variants.

To see more about how to control your declared variants, check out Motion Instance.

Nightly release channel

You can try out the latest changes before a stable release by installing the nightly release channel.

npm install @vueuse/motion@npm:vueuse-motion-nightly

Credits

This package is heavily inspired by Framer Motion by @mattgperry.

If you are interested in using WAAPI, check out Motion.dev!

I would also like to thank antfu, patak-dev and kazupon for their kind help!

If you like this package, consider following me on GitHub and on Twitter.

👋

Extension points exported contracts — how you extend this code

MotionPluginOptions (Interface)
(no doc)
src/types/plugin.ts
ModuleOptions (Interface)
(no doc)
src/nuxt/src/module.ts
SVGPathProperties (Interface)
(no doc)
src/types/variants.ts
TransformProperties (Interface)
(no doc)
src/types/variants.ts
Orchestration (Interface)
(no doc)
src/types/transitions.ts
Repeat (Interface)
(no doc)
src/types/transitions.ts

Core symbols most depended-on inside this repo

waitForMockCalls
called by 10
tests/utils/index.ts
reactiveTransform
called by 7
src/reactiveTransform.ts
push
called by 7
src/useMotionTransitions.ts
set
called by 7
src/motionValue.ts
reactiveStyle
called by 5
src/reactiveStyle.ts
useMotion
called by 4
src/useMotion.ts
useElementTransform
called by 4
src/useElementTransform.ts
useElementStyle
called by 4
src/useElementStyle.ts

Shape

Function 94
Interface 20
Method 15
Class 4

Languages

TypeScript100%

Modules by API surface

src/motionValue.ts16 symbols
src/utils/transition.ts11 symbols
src/types/transitions.ts8 symbols
src/utils/defaults.ts7 symbols
src/utils/component.ts6 symbols
src/useMotionControls.ts6 symbols
src/types/instance.ts6 symbols
src/utils/transform.ts5 symbols
src/utils/subscription-manager.ts5 symbols
src/useMotionValues.ts4 symbols
src/directive/index.ts4 symbols
tests/utils/index.ts3 symbols

Dependencies from manifests, versioned

@nuxt-themes/docus1.15.0 · 1×
@nuxt/content2.12.1 · 1×
@nuxt/kit3.13.0 · 1×
@nuxt/module-builder0.8.3 · 1×
@nuxt/schema3.13.0 · 1×
@types/prismjs1.26.4 · 1×
@vitejs/plugin-vue5.0.4 · 1×
@vitest/coverage-v81.6.0 · 1×
@vue/test-utils2.4.6 · 1×
@vueuse/core13.0.0 · 1×
@vueuse/head2.0.0 · 1×

For agents

$ claude mcp add motion \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact