HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulebrick-2.10Haskell2010

Brick.Widgets.Border

This module provides border widgets: vertical borders, horizontal borders, and a box border wrapper widget. All functions in this module use the rendering context's active BorderStyle; to change the BorderStyle, use withBorderStyle.

  • 10 values
  • Packagebrick-2.10
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceBorder.hs

Border wrapper

2 declarations
valueborderWithLabel
  1. :: Widget n

    The label widget

  2. -> Widget n

    The widget to put a border around

  3. -> Widget n
#

Put a border around the specified widget with the specified label widget placed in the middle of the top horizontal border.

Note that a border will wrap its child widget as tightly as possible, which means that if the child widget is narrower than the label widget, the label widget will be truncated. If you want to avoid this behavior, add a fill or other space-filling wrapper to the bordered widget so that it takes up enough room to make the border horizontally able to avoid truncating the label.

Horizontal border

2 declarations
valuehBorderWithLabel
  1. :: Widget n

    The label widget

  2. -> Widget n
#

A horizontal border with a label placed in the center of the border. Fills all horizontal space.

Vertical border

1 declaration

Drawing single border elements

1 declaration
valueborderElem :: (BorderStyle -> Char) -> Widget n
#

Draw the specified border element using the active border style using borderAttr.

Does not participate in dynamic borders (due to the difficulty of introspecting on the first argument); consider using joinableBorder instead.

Attribute names

3 declarations

Utility

1 declaration
valuejoinableBorder :: Edges Bool -> Widget n
#

A single-character dynamic border that will react to neighboring borders, initially connecting in the given directions.