mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #496] Box component background + border #130
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DennisKo on GitHub (Jan 8, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/496
How do we correctly style a
<box>with a border and a background, so that the background actually spans exactly the component area. I see either the background bleeding out of the container (left box) or a gap inside the box (right box).I guess its because of the title? I am using
@opentui/react + @opentui/corev0.1.69.@kommander commented on GitHub (Jan 8, 2026):
You can use
customBorderCharsto use Unicode borders.@DennisKo commented on GitHub (Jan 9, 2026):
I don't see how this helps with the background problem. I tried using some custom borders and the background gap/bleeding remains.
@msmps commented on GitHub (Jan 9, 2026):
Ink has the same problem (see below)!
A solution is to set background color of the terminal via the renderer to match the background color of the box which gives this illusion (left)
Source
@DennisKo commented on GitHub (Jan 9, 2026):
That kind of defeats the purpose of a background in a box. Is this such an exotic use case?
@peter-wasilko commented on GitHub (Feb 13, 2026):
I don't see why this was closed, we still can't make a button widget using the rounded borderStyle and set a background color on it without the background color spilling out over the frame line as a solid unrounded rectangle. I think we need a custom color font to draw the boder line so outside the line is solid black, the line itself is the border color, and inside the line is transparent to show the component's background color. Otherwise we can't have solid looking button with a colored fill. If there is some existing unicode hack to address this issue, it really needs to be discussed in the docs. Or perhaps there are some line drawing Terminal Escape Codes that could generate the desired effect.