Block
The Block
widget serves as a foundational building block for structuring and framing other
widgets. It’s essentially a container that can have borders, a title, and other styling elements to
enhance the aesthetics and structure of your terminal interface. This page provides an in-depth
exploration of the Block
widget.
Basic Usage
The simplest use case for a Block
is to create a container with borders:
Titles
A common use case for Block is to give a section of the UI a title or a label:
You can also use the Title
struct for better positioning or multiple titles.
Border style
Block provides flexibility in both the borders style and type: