Raxol.UI.Components.Display.Text (Raxol v2.6.0)

View Source

Styled text rendering with wrapping, alignment, and truncation.

Display-only widget -- no keyboard handling.

Props:

  • content (string) -- text to display
  • wrap (:word | :char | :none) -- wrapping mode, default :none

  • align (:left | :center | :right) -- alignment within width, default :left

  • width (integer | nil) -- constraint for wrapping/alignment/truncation

  • truncate (boolean) -- truncate with ellipsis when exceeding width, default false
  • style, theme, id -- standard

Summary

Types

t()

@type t() :: %{
  id: String.t() | atom(),
  content: String.t(),
  wrap: :word | :char | :none,
  align: :left | :center | :right,
  width: non_neg_integer() | nil,
  truncate: boolean(),
  style: map(),
  theme: map()
}

Functions

broadcast(msg)

command(cmd)

mount(state)

Callback implementation for Raxol.UI.Components.Base.Component.mount/1.

schedule(msg, delay)

unmount(state)

Callback implementation for Raxol.UI.Components.Base.Component.unmount/1.

update(props, state)

Callback implementation for Raxol.UI.Components.Base.Component.update/2.