Svelte: Supporting .animate() ?

Created on 31 Dec 2016  Â·  3Comments  Â·  Source: sveltejs/svelte

I really loved using Ractive's .animate() (http://docs.ractivejs.org/latest/ractive-animate) to transition values. Would you be open to adding this to Svelte?

enhancement

Most helpful comment

We now have https://github.com/sveltejs/svelte-extras, which includes an animate method — closing this

All 3 comments

I think methods like animate should be available, but not included by default, since it adds a non-trivial amount of code that a lot of apps don't need.

The easiest way would probably be to have a svelte/extras directory with extra methods and (maybe) a selection of common plugins:

<div><!-- template goes here --></div>

<script>
  import animate from 'svelte/extras/animate.js';

  export default {
    methods: {
      animate
    }
  };
</script>

(Of course, this could be done as a completely third-party thing, though I like the batteries-included approach.)

+1 for having this type of functionality as separate 'AddOn' modules. It yields a lighter core, plus allows for 'specialist' committers to focus on their own subject matter area e.g. 'Charting', 'Animation' etc without needing to care about the core code-base.

We now have https://github.com/sveltejs/svelte-extras, which includes an animate method — closing this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rich-Harris picture Rich-Harris  Â·  3Comments

thoughtspile picture thoughtspile  Â·  3Comments

1u0n picture 1u0n  Â·  3Comments

lnryan picture lnryan  Â·  3Comments

mmjmanders picture mmjmanders  Â·  3Comments