blessed
blessed copied to clipboard
How to set box exact height and width?
const screen = blessed.screen();
screen.append(blessed.box({
label: 'test 1',
border: {
type: 'line',
},
top: 0,
left: 0,
width: 10,
height: 10,
}));
screen.render();
If I run this example script I get a rectangle that is taller than it is wide. How do I set the exact width and height of the box so that it's a square?
Change your font where each character is the same width as height... This is a terminal library, your size is going to be based on base level character size for your terminal characters... it's not a pixel based drawing library per se.