View Source Underthehood (Underthehood v0.2.0)

A collection of LiveView components providing interactive IEx terminals.

This module serves as the main public API for using the Underthehood library. It provides different Phoenix LiveView components for embedding interactinve IEx terminals into templates.

Link to this section Summary

Functions

Embeds a LiveView component representing an interactive IEx terminal to the BEAM.

Embed a little button (located in the bottom-right corner of the browser's viewport) which, when clicked, opens an IEx terminal. The terminal can be closed again by clicking the 'X' button in the top-right corner.

Link to this section Functions

Embeds a LiveView component representing an interactive IEx terminal to the BEAM.

Note that there is no built-in way to close this terminal. It's meant as a building block for more complex integrations (see e.g. Underthehood.terminal_button/1).

This component is meant to be invoked using the HEex syntax for function components. An optional id assign can be passed if desired (e.g. in case more than one terminal window should be shown):

examples

Examples

<.terminal/>
<.terminal id={:my_terminal}/>
Link to this function

terminal_button(assigns)

View Source

Embed a little button (located in the bottom-right corner of the browser's viewport) which, when clicked, opens an IEx terminal. The terminal can be closed again by clicking the 'X' button in the top-right corner.

This component is meant to be invoked using the HEex syntax for function components. An optional id assign can be passed if desired.

examples

Examples

defmodule MyAppWeb.DemoLive do
  use MyAppWeb, :live_view

  import Underthehood, only: [terminal_button: 1]

  def render(assigns) do
    ~H"""
      <div>My markup</div>
      <.terminal_button/>
    """
  end
end