benlime

benlime

🍿 LiveMotion - High performance animations for Phoenix LiveView

LiveMotion enables high performance animations declared on the server and run on the client.

As a follow up to my previous thread A library for high performance LiveView animations I released the first initial version 0.1.0 of the library for you to play around with it.

There is still a lot to do, but works as a first version. I would be glad if you give it a try. I hope it makes animations using LiveView a lot more convenient.

Docs: LiveMotion — LiveMotion v0.3.1
Repo: GitHub - benvp/live_motion: High performance animation library for Phoenix LiveView
Examples: https://livemotion.benvp.co

https://cleanshot-cloud-fra.accelerator.net/media/26144/yvBCYQ2B1940j2e20mhHJO12vauM1cfJo5gJgRP0.mp4
https://cleanshot-cloud-fra.accelerator.net/media/26144/p5RbCZhU7yRjtyBAb6E9U0LCNjzeJgBvGjP4Tqc7.mp4
If it would be preferable to merge it with my previous thread, please do so :slight_smile: I just thought it would be better to have a distinct thread for it.

Cheers
Ben

Most Liked

benlime

benlime

I just released v0.3.0 of LiveMotion. This update includes support for LiveView 0.18 and adds a few new things. Check out the changelog.

Next up will be a new component called presence which will make transitions like the following possible.

I orignally wanted to include it in this release, but it is still a bit experimental and needs a bit of polishing.

Stay tuned.

benlime

benlime

I added a website with a few examples of LiveMotion. I’ll add more in the next couple of weeks.

15
Post #8
benlime

benlime

Just release v0.1.2 which adds the LiveMotion.JS.show/1 function. This function was previously mentioned in the docs, but did not exist yet.

This let’s you now add client side animations for dynamically showing elements (e.g. on button clicks).

11
Post #2
benlime

benlime

Not sure if I am missing something, but I think that’s not required for LiveMotion because all animations happen on the client. So there is actually no need to have cubic-bezier functions within the Elixir codebase.

v0.2.0

I released a new version which introduces two new lifecycle functions on_animation_start and on_animation_complete. These will allow you to push events or run JS actions whenever an animation starts or ends. You can do something like the following (in a phx-click handler for example):

MotionJS.animate([rotate: [0, 45, -45, 90, 0]], [duration: 1], to: "#rectangle")
  |> MotionJS.show(to: "#love-div", keyframes: [opacity: 1, y: 20, rotate: 180])
  |> Phoenix.LiveView.JS.push("some_push")

Additionally fixes a bug that animations did not run on update.

cblavier

cblavier

Awesome! Keep up with the good work :muscle:

Where Next?

Popular in Libraries Top

Qqwy
TypeCheck: Fast and flexible runtime type-checking for your Elixir projects. Core ideas Type- and function specifications are const...
336 13801 100
New
hpopp
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: https://github.com/devonestes/assertions ...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. Features Unstyled Phoenix components. Storybook that can be added to...
New
mbuhot
Leverage Open Api 3.0 (Swagger) to document, test, validate and explore your Plug and Phoenix APIs. Generate and serve a JSON Open API ...
New
woutdp
Hi! I wanted to introduce my latest project LiveSvelte. It allows you to render Svelte inside LiveView with end-to-end reactivity. It’s ...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
Hal9000
Here is my first stab at this. README pasted below. https://github.com/Hal9000/elixir_random Comments and critiques are welcome. Th...
New
bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
381 12391 119
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

Sub Categories:

We're in Beta

About us Mission Statement