Core element struct representing a node in the UI tree.
Every UI component — whether built-in (box, text, input) or user-defined — produces an Element tree. The layout engine consumes this tree to compute positions, and the renderer paints it to the terminal.
Summary
Functions
Create an element from type, keyword attrs, and children list.
Types
@type element_type() ::
:box
| :text
| :label
| :panel
| :button
| :input
| :select
| :checkbox
| :scroll_box
| :textarea
| :tab_select
| :line_number
| :code
| :markdown
| :diff
| :frame_buffer
| :ascii_font
| :component
@type t() :: %ElixirOpentui.Element{ attrs: map(), children: [t()], component: module() | nil, id: term(), style: ElixirOpentui.Style.t(), type: element_type() }
Functions
@spec new(element_type(), keyword(), [t()] | t()) :: t()
Create an element from type, keyword attrs, and children list.