MIT License

项目介绍

vueuse/motion 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 2.8k 个 Star、93 次 Fork。

仓库全名
vueuse/motion
开源许可证
MIT License
Star 数
2.8k
Fork 数
93
未关闭 Issue
50

README 摘要

🤹 @vueuse/motion 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 <25kb bundle size 🌍 Documentation 👀 Demos Quick Start Let's get started by installing the package and adding the plugin. From your…

完整内容见 GitHub 原始 README 或本页 。

常见问题

motion 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 2.8k 个 Star。

motion 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 motion 的源码?

可以直接克隆仓库:git clone https://github.com/vueuse/motion.git,默认分支为 main;安装与运行步骤见仓库 README。

motion 最近还在维护吗?

仓库最近一次更新为 2025年3月11日,当前有 50 个未关闭 Issue;Star 数为 2.8k,可作为社区活跃度的参考。

简要分析

热度分
2966
价值分
1686
活跃状态
活跃

语言占比

CSS
HTML
JavaScript
Shell
TypeScript
Vue

Release

README

🤹 @vueuse/motion

npm npm npm minzip size 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 <25kb 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>
  <div
    v-motion
    :initial="{
      opacity: 0,
      y: 100,
    }"
    :enter="{
      opacity: 1,
      y: 0,
    }"
  />
</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.

👋

评论

暂无评论