Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A server-side rendering component library for Phoenix that builds interactive UIs with minimal JavaScript.
Surface is a server-side rendering component library for Phoenix that builds rich interactive user interfaces with minimal custom JavaScript.
Surface is a server-side rendering component library built on top of Phoenix LiveView and its component API. It takes Elixir component modules that use the ~F sigil and compiles them into LiveView-compatible code, producing real-time, interactive UIs without client-side JavaScript. The library is authored by Marlus Saraiva and released under the MIT License.
prop, enabling compile-time validation of how components are used.Elixir and Phoenix developers who want to build rich front-ends without writing JavaScript should use Surface. Teams already using Phoenix LiveView will find Surface's component model a natural fit. Developers who value compile-time safety in their templates benefit from Surface's validation of props, slots, and events.
mix surface.init to configure a new project, with a --demo flag that creates a sample component at /demo.--catalogue flag to generate a living style guide at /catalogue for documenting components.Install Phoenix with mix phx.new my_app, add {:surface, "~> 0.12.0"} to mix.exs, then run mix surface.init to update required files. The init task can generate a demo component and a Surface Catalogue with --demo --catalogue. Finally, start the server with mix phx.server and visit http://localhost:4000.
Yes. Surface is open source under the MIT License, so it can be used freely in commercial and personal projects.
Yes. Surface is built on top of Phoenix LiveView and its component API, so you need a Phoenix application with LiveView installed.
Add {:surface, "~> 0.12.0"} to your mix.exs dependencies, run mix deps.get, and then run mix surface.init to configure the project.
It is a generated, living style guide for your components. Running mix surface.init --catalogue sets it up at the /catalogue route.
