A single title entry inside a %ExRatatui.Widgets.Block{}.
Blocks can carry any number of titles, each anchored to the top or bottom border and aligned left, center, or right. The classic "filename | scroll %" header is two titles on the top border with opposite alignments.
Fields
:content— anyExRatatui.Text-coercible line-like value: aString.t(),%Span{},%Line{}, or a list of spans. Multi-line content raises.:position—:top,:bottom, ornil(falls back to the block's:title_position, which defaults to:top).:alignment—:left,:center,:right, ornil(falls back to the block's:title_alignment, which defaults to:left).:style—%ExRatatui.Style{}ornil. Whennil, the block's:title_styleapplies.
Examples
iex> alias ExRatatui.Widgets.Block.Title
iex> %Title{content: "Search", alignment: :left}
%ExRatatui.Widgets.Block.Title{
content: "Search",
position: nil,
alignment: :left,
style: nil
}
Summary
Types
@type alignment() :: :left | :center | :right | nil
@type content() :: String.t() | ExRatatui.Text.Span.t() | ExRatatui.Text.Line.t() | [ExRatatui.Text.Span.t()]
@type position() :: :top | :bottom | nil
@type t() :: %ExRatatui.Widgets.Block.Title{ alignment: alignment(), content: content(), position: position(), style: ExRatatui.Style.t() | nil }