View Source Kino.Text (Kino v0.12.3)
A kino for rendering text content.
For rich text, use Kino.Markdown
.
examples
Examples
Kino.Text.new("Hello!")
[:green, "Hello!"]
|> IO.ANSI.format()
|> IO.iodata_to_binary()
|> Kino.Text.new(terminal: true)
Link to this section Summary
Functions
Creates a new kino displaying the given text content.
Link to this section Types
@opaque t()
Link to this section Functions
Creates a new kino displaying the given text content.
options
Options
:terminal
- whether to render the text as if it were printed to standard output, supporting ANSI escape codes. Defaults tofalse
:chunk
- whether this is a part of a larger text. Adjacent chunks are merged into a single text. This is useful for streaming content. Defaults tofalse