Box
Box is the simplest layout container in Ansiq. Use it to stack children vertically or horizontally.
Smallest example
let layout = Box::column()
.gap(1)
.child(Text::new("Header").build())
.child(Paragraph::new("Body").build())
.build();Use Box when
- you need a row or column quickly
- you want spacing between children
- you do not need a visible frame
Key builder methods
Box::column()Box::row().gap(...).child(...),.children(...).layout(...).style(...)
Common combinations
Box + Blockwhen the group also needs a borderBox + Input + Paragraphfor simple forms
Last updated on
