GithubHelp home page GithubHelp logo

hannoeru / motion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vueuse/motion

0.0 1.0 0.0 2.12 MB

๐Ÿคน Vue Composables putting your components in motion

Home Page: https://motion.vueuse.org

License: MIT License

JavaScript 6.03% TypeScript 93.97%

motion's Introduction

๐Ÿคน @vueuse/motion

npm npm Netlify Status

Vue Composables putting your components in motion

  • ๐ŸŽ Smooth animations based on Popmotion
  • ๐ŸŽฎ Declarative API
  • ๐Ÿš€ Plug & play with 10+ presets
  • โœ… Supports Vue 2 & 3 using vue-demi
  • ๐Ÿšš Supports Nuxt using nuxt-use-motion
  • โœจ Written in TypeScript
  • ๐Ÿ‹๏ธโ€โ™€๏ธ Lightweight with <20kb bundle size

๐ŸŒ Documentation

๐Ÿ‘€ Demos

Quick Start

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

From your terminal:

yarn add @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 animations 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.

Credits

This package is heavily inspired by Framer Motion.

I would also like to thank antfu and patak for their kind help!

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

๐Ÿ‘‹

motion's People

Contributors

tahul avatar antfu avatar ryan2128 avatar eertmanhidde avatar rvmourik avatar santicros avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.