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.
Builds a render-only text input widget.
Builds a render-only progress bar widget.
Renders a terminal document to a string.
Starts a supervised Cringe runtime.
Builds a render-only select/list widget.
Builds a render-only spinner widget.
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 input(keyword()) :: Cringe.Document.t()
Builds a render-only text input widget.
@spec progress(keyword()) :: Cringe.Document.t()
Builds a render-only progress bar widget.
@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 select(keyword()) :: Cringe.Document.t()
Builds a render-only select/list widget.
@spec spinner(keyword()) :: Cringe.Document.t()
Builds a render-only spinner widget.
@spec text( IO.chardata(), keyword() ) :: Cringe.Document.Text.t()
Builds a text node.
iex> Cringe.text("hello")
%Cringe.Document.Text{content: "hello", opts: []}