The content to frame (string or array of lines).
Visual options; see BoxOptions.
A multi-line string ready for terminal output.
Layout
\n) or an array of lines.style is applied to each line before width measurement.max(longestLine + 2·padding, title.length + 4, width ?? 0).Title
Coloring
borderColor is provided, all border segments (top/bottom/verticals) are wrapped by colorText.style if needed.Unicode & terminal caveats
┌─┐│└┘). Some fonts/terminals render them with differing cell widths, which can affect alignment. Consider sticking to ASCII (+, -, |) via the "dashed" style for maximum portability.text.length counts code units; grapheme clusters (emoji/ZWJ/combining marks) may occupy multiple columns or be split visually. For perfect alignment, segment into graphemes (e.g., Intl.Segmenter) and compute display width with a wcwidth-style algorithm.length, so styled lines can appear mismeasured unless you strip escapes before measuring.
Draw a framed box around
contentwith optional title, padding, and colorized borders.