View Source BackBreeze.Box (BackBreeze v0.4.1)
A Box is the basic styling primitive used in BackBreeze. If a box has children, they will be rendered first and collapsed down, until a single box remains with the rendered contents.
Summary
Functions
Create a new BackBreeze.Box struct.
Render a box and a tree of its children.
Render a box and a tree of its children whilst tracking dimensions.
Functions
Create a new BackBreeze.Box struct.
Options
:style- a style map, with any valid keys fromBackBreeze.Style. The:borderstyle can be provided as:linefor convenience.
All other options are passed to the BackBreeze.Box struct.
Render a box and a tree of its children.
Options
:terminal- the terminal to use. This is used for the terminal size if provided.
Render a box and a tree of its children whilst tracking dimensions.
This function returns the box as with render/2, but it is wrapped in a map which
also contains the rendered dimension for each box as a flat list.
This can be used at a higher level to determine the viewport.
Options
See render/2