View Source ElementTui.Component protocol (ElementTui v0.5.1)
Protocol that needs to be implemented to support a component
Designing a component is as simple as implementing the protocol for your type.
For an example see the ElementTui.Component.Margin
module.
Summary
Functions
Returns the minimal width and height requested by the Element and additional keywords
Returns the data needed to render your screen
Types
@type t() :: term()
All the types that implement this protocol.
Functions
Returns the minimal width and height requested by the Element and additional keywords
The return value is a tuple with {width, height, keywords}
Keywords
[vflex: weight] Can grow vertically to take up more space relative to its weight (and other vflex elements) [hflex: weight] Can grow horizontally to take up more space relative to its weight (and other vflex elements)
Returns the data needed to render your screen