Skip to content

@jsvision/ui / frameTitleMinimumWidth

Function: frameTitleMinimumWidth() ​

frameTitleMinimumWidth(title, numbered?): number

Defined in: ui/src/window/frame.ts:39

Minimum full frame width that preserves a complete centered title.

Parameters ​

title ​

string

Visible title text.

numbered? ​

boolean = false

Whether the frame also shows a window number.

Returns ​

number

Required full frame width in terminal cells.

Example ​

ts
import { frameTitleMinimumWidth } from '@jsvision/ui';

const width = frameTitleMinimumWidth('Settings');