X_component

screenshot of X_component

Component-based HTML templates for Elixir/Phoenix, inspired by Vue

Overview:

X.Component is a library for Elixir/Phoenix that provides component-based HTML templates inspired by Vue. It is a zero-dependency, framework/library agnostic tool that is optimized for use with Phoenix and Gettext.

Features:

  • Declarative HTML template syntax: X.Component offers a syntax that is similar to Vue, allowing for easy and intuitive template creation.
  • Compile time errors and warnings: The library provides helpful feedback and error messages during compile time, helping developers catch potential issues early on.
  • Type checks with dialyzer specs: X.Component supports type checking using dialyzer specs, ensuring code consistency and reducing the likelihood of runtime errors.
  • Template code formatter: X.Component includes a template code formatter, making it easy to maintain consistent and clean code across the project.
  • Inline, context-aware components: X.Component supports inline components that are aware of their parent's context, enabling efficient rendering and communication between components.
  • Smart attributes merge: The template compiler intelligently merges style and class attributes, avoiding overriding and allowing for flexible customization.
  • Decorator components: X.Component allows for the creation of decorator components which can modify the behavior or appearance of other components.
  • Fast compilation and rendering: X.Component is optimized for performance, offering fast compilation and rendering speeds.
  • Optimized for Gettext/Phoenix/ElixirLS: X.Component is specifically designed to integrate seamlessly with Gettext, Phoenix, and ElixirLS, providing an efficient workflow for developers.

Summary:

X.Component is a powerful library for Elixir/Phoenix that brings the benefits of component-based HTML templates to the Elixir ecosystem. With its intuitive syntax, compile-time checks, and performance optimizations, X.Component offers a seamless development experience. By integrating easily with Gettext, Phoenix, and ElixirLS, X.Component ensures compatibility with existing tools and workflows. Overall, X.Component empowers developers to build robust and maintainable web applications in Elixir/Phoenix.