Git Product home page Git Product logo

vue-motion's Introduction

VueMotion

Build Status codecov npm vue2 size

Easy and natural state transitions

Documentation

Check out the docs and the Demo

npm install --save vue-motion

Development

npm run dev

License

Thanks to @chenglou and all who contributed to react-motion, from which, this project was inspired.

MIT

vue-motion's People

Contributors

liborvanek avatar posva avatar thecrypticace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-motion's Issues

Add deep nested objects supports

Support nested objects for values:

values: {
  size: {
    width: 300,
    height: 200,
  },
}
<Motion :values="values">
  <template scope="_values">
    {{ _values.size.width }}x{{ _values.size.height }}
  </template>
</Motion>

Ability to override currentVelocities

Public API for the Motion component that would allow to read and set currentVelocities. Not sure if this would set idealVelocities as well.
Use case adding a new value, setting the velocity to an existing one

Is there human understandable example how to use it?

Ok. This example from Docs make no sense for me. Sorry.

<Motion :value="offset" tag="div">
  <div slot-scope="props" :style="{ transform: `translateX(${props.value}px)` }"></div>
</Motion>
// in the component
this.offset = 200
  1. What component you are talking about?
  2. What is this.offset?
  3. What is props?

How to use with dynamic growing/shrinking lists / default values.

Hi, first of all, I love the library! but i'm struggling to create a dynamic carrousel that appends / removes items in a list. I get errors for the items that do not exist yet in the new list. Is there a way to provide default values for new items?

Simple example:

<template>
<ul>
  <Motion :values="children">
    <div slot-scope="_children">
      <div v-for="(child, index) in _children" :key="index">
        <p>{{child.offset}}</p>
      </div>
    </div>
  </Motion>
  <button v-on:click="testPush">test Push</button>
  <button v-on:click="test">test</button>
</ul>
</template>

<script lang="ts">
import { Motion } from "vue-motion"

export default {
  components: {
    Motion
  },
  data() {
    return {
      children: [{
        offset: 0,
      }],
    }
  },
  methods: {
    test() {
      this.$data.children = [{offset: 100}, {offset: 200}]
    },
    testPush() {
      this.$data.children.push({offset: 200})
    }
  }
}
</script>

Thanks!

Add StaggeredMotion

I don't think it's that useful but hey, it's so fancy

The current state of this feature: โŒ Not worth the cost implementing
If you know of any other use cases that would make this feature worth adding, please, share them ๐Ÿ™‚

Demo Page is Broken

Hi @posva , thanks for bringing react plugin into vue world. But it seems currently the demo was broken, when I open the link on the description above, it didn't show anything. I saw the console and this message was appear.
image

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.