LiveElements is a library to make working with custom elements from Phoenix LiveView a better experience. In short, we give you a macros to product function components so that calling custom elements is just as easy as calling any other functional component. We support serialization of complex attribute data and automatically listen for custom events. What’s more, if you have or are able to generate a custom elements manifest file, we can consume that and generate the helper functions
for you at compile time. It’s brand new, so expect some rough edges, but we have decent integration tests and hopefully decent documentation. Looking forward to hearing from the community!
Found a small bug, so released a new version as 0.1.1. Also, short notice but I’ll be demoing at Omaha Elixir in just a couple hours: Beyond LiveView , Thu, Mar 9, 2023, 5:30 PM | Meetup. I’ll post the recording later.
Had a look at the Readme and I like what I see.
Thought about the combination of custom elements and Phoenix one day, but didn’t find time to experiment yet. Once I will, I’ll return for this lib.
Just shipped 0.2.2, new release that is mainly a bugfix to allow elements that have a name
attribute (eg form associated custom elements) to work properly.
Another fix in 0.2.3 to enable custom element functional components to be self closing eg <.foo_element />