Raxol.HEEx (Raxol v2.0.1)

View Source

HEEx template integration for Raxol.

Allows using Phoenix HEEx templates directly in terminal applications, with terminal-specific components and styling.

Example

defmodule MyHEExApp do
  use Raxol.HEEx

  def render(assigns) do
    ~H"""
    <.terminal_box padding={2} border="single">
      <.terminal_text color="green" bold>
        Hello, <%= @name %>!
      </.terminal_text>

      <.terminal_button phx-click="click_me" class="primary">
        Click me!
      </.terminal_button>
    </.terminal_box>
    """
  end
end

Summary

Functions

Compile HEEx templates for terminal rendering.

Functions

compile_heex_for_terminal(template, assigns)

Compile HEEx templates for terminal rendering.

This function takes standard HEEx templates and converts them to terminal buffer operations.