OTP-native terminal UI toolkit for Elixir.
Cringe builds terminal documents from plain Elixir data and renders them into terminal frames. The API is intentionally small while the package is early.
Summary
Functions
Renders a terminal document to a frame.
Renders a terminal document to a string.
Starts a supervised Cringe runtime.
Builds a text node.
Functions
@spec frame(Cringe.Document.t(), Cringe.Renderer.render_opts()) :: Cringe.Frame.t()
Renders a terminal document to a frame.
@spec render(Cringe.Document.t(), Cringe.Renderer.render_opts()) :: String.t()
Renders a terminal document to a string.
iex> Cringe.text("hello") |> Cringe.render(width: 3)
"hel"
@spec run( module(), keyword() ) :: GenServer.on_start()
Starts a supervised Cringe runtime.
@spec text( IO.chardata(), keyword() ) :: Cringe.Document.Text.t()
Builds a text node.
iex> Cringe.text("hello")
%Cringe.Document.Text{content: "hello", opts: []}