box: side-only borders render nothing without an explicit height
Author: RayhanHaqiCreated Sep 11, 2026Updated Sep 11, 2026
Summary
A box with a side-only border and no children does not draw its border unless height={1} is set explicitly. The rule is silently absent, which is easy to misread as a theming problem.
Environment
- @opentui/core 0.5.11 (via @opentui/solid 0.5.11)
- Bun 1.4.0, Linux
Steps to reproduce
<box border={["top"]} borderColor="#505050" />(no height).- Compare with
<box border={["top"]} height={1} borderColor="#505050" />.
Actual
Without an explicit height the box collapses and the top border is not visible.
Expected
Either auto-size a side-only border to at least 1 row, or document that side-only borders require an explicit height (a dev warning would also help).
Workaround
Set height={1}.
Source: anomalyco/opentui