View Source Underthehood (Underthehood v0.1.1)
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 top-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
componets. 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}/>
Embed a little button (located in the top-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
componets. An optional id
assign can be passed if desired.
examples
Examples
import Underthehood, only: [terminal_button: 1]
# ...
def render(assigns) do
~H"""
<div>My markup</div>
...
<.terminal_button/>
"""
end