Creating an Elixir library with bundled JavaScript and CSS
Developing a component library for Phoenix LiveView and Surface
We started developing a component library for Phoenix LiveView applications that use
Surface. The library is called supabase-surface, and provides Surface components which are styled after
Supabase's component library for React.
Some components also implement additional functionality, for example the Auth component.
This component is responsible for handling the different
authentication mechanisms that are offered by Supabase (e.g. magic link and social providers like Github),
which had to be implemented via hooks with JavaScript.
Because of the styling and the necessary JavaScript code, our library not only has to ship the Elixir code,
but also the JS and CSS.
Read more