An open API service indexing awesome lists of open source software.

https://github.com/bluwy/svelte-motion

Experimental web animations support for Svelte transitions
https://github.com/bluwy/svelte-motion

svelte transition web-animations-api

Last synced: about 1 year ago
JSON representation

Experimental web animations support for Svelte transitions

Awesome Lists containing this project

README

          

# svelte-motion

Experimental [web animations](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API) support for Svelte transitions, powered by [Motion](https://motion.dev/).

> Not an npm package yet

## Try it out

https://svelte-motion.netlify.app

And read [the code](src/lib).

## Usage

Use with normal Svelte transitions. No API change!

```svelte

import { fade } from '$lib'

{#if visible}


{/if}
```

## Limitations

- No elastic and bounce easing. Web animations don't support those, so they require dynamic keyframe generation, similar to how Svelte's CSS transition work. Not implemented yet.

- No custom easing functions. Use CSS easing functions instead.

## License

MIT