Home / Latest

Phoenix Framework Releases LiveView 1.2
Image: Wikipedia
Latest

Phoenix Framework Releases LiveView 1.2

WireByte Staff · June 14, 2026

The Phoenix Framework has released LiveView 1.2, a significant update that allows developers to colocate CSS in HEEx templates. This feature builds on the colocated JavaScript functionality introduced in LiveView 1.1. The update also includes the @scope rule for scoping styles. The release aims to improve developer productivity and flexibility.

Key points

  • Phoenix Framework has released LiveView 1.2, a major update to its real-time application framework.
  • The new version allows developers to colocate CSS in HEEx templates, similar to colocated JavaScript in LiveView 1.1.
  • The @scope rule is included for scoping styles and preventing accidental application to other elements.
  • Developers can update to LiveView 1.2 by changing the version requirement in their mix.exs file and re-fetching dependencies.
  • The release aims to improve developer productivity and flexibility in building real-time applications.

Phoenix Framework Releases LiveView 1.2

The Phoenix Framework has released LiveView 1.2, a significant update to its real-time application framework. This release includes the highly anticipated feature of colocating CSS in HEEx templates, similar to colocated JavaScript in LiveView 1.1.

What's New in LiveView 1.2

The new version allows developers to write hooks directly inside any HEEx template, using the def table(assigns) syntax. This feature is built on the background work done for Phoenix.LiveView.ColocatedJS. The :type attribute is used to extract the content of the tag at compile time into a special phoenix-colocated folder in the _build directory.

Scoping Styles with @scope Rule

The @scope rule is included in LiveView 1.2 for scoping styles and preventing accidental application to other elements on the page from different components. This feature is a significant improvement for developers who want to keep their styles organized and prevent conflicts.

Updating to LiveView 1.2

Developers can update to LiveView 1.2 by changing the version requirement in their mix.exs file and re-fetching dependencies. This process is straightforward and should not cause any issues.

Conclusion

The release of LiveView 1.2 is a significant step forward for the Phoenix Framework. The new features and improvements will make it easier for developers to build real-time applications and improve their productivity and flexibility.

Sources

WireByte Staff — Editorial Team

The WireByte editorial team synthesises technology news from multiple primary sources, verifies the facts, and links every source. Articles are produced with AI assistance and reviewed under our editorial policy.