Expand description
Shared box-drawing primitives for bordered UI components (text entry, selector).
Constants§
- BORDER_
ROWS - Number of border rows in a box (top border + bottom border).
- CHROME_
WIDTH - Total columns consumed by border chrome: “│ “ + “ │” = 4.
- CONTENT_
OFFSET - Columns consumed by the left border before content starts (“│ “ = 2).
- CORNER_
BOTTOM_ LEFT - CORNER_
BOTTOM_ RIGHT - CORNER_
TOP_ LEFT - CORNER_
TOP_ RIGHT - HORIZONTAL
- INNER_
PADDING - Space padding inside the vertical bars (one space each side).
- VERTICAL
Functions§
- bottom_
border - Plain bottom border:
╰──────╯ - snap_
even - Snap a width to the nearest even number, using
min_widthwhen rounding would collapse a nonzero value to zero. Used during partial-open animation so the box stays symmetric as it grows. - top_
border - Plain top border:
╭──────╮