[GH-ISSUE #64] box.customBorderChars crashes when passing a BorderCharacters object #15

Closed
opened 2026-03-02 23:43:52 +03:00 by kerem · 2 comments
Owner

Originally created by @ReverseGem7 on GitHub (Aug 24, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/64

Description

When passing a plain BorderCharacters object to box.customBorderChars on @opentui/react, the library crashes with:

FATAL ERROR OCCURRED
Error details:
Unable to convert [object Object] to a pointer
...

Workaround

Currently, you must manually convert the object using borderCharsToArray():

import { borderCharsToArray } from "@opentui/core";

const border = borderCharsToArray({
  topLeft: "┌",
  topRight: "┐",
  bottomLeft: "└",
  bottomRight: "┘",
  horizontal: "─",
  vertical: "│",
  topT: "┬",
  bottomT: "┴",
  leftT: "├",
  rightT: "┤",
  cross: "┼",
});

<box customBorderChars={border}>...</box>
Originally created by @ReverseGem7 on GitHub (Aug 24, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/64 ### Description When passing a plain `BorderCharacters` object to `box.customBorderChars` on `@opentui/react`, the library crashes with: ``` FATAL ERROR OCCURRED Error details: Unable to convert [object Object] to a pointer ... ``` ### Workaround Currently, you must manually convert the object using `borderCharsToArray()`: ```ts import { borderCharsToArray } from "@opentui/core"; const border = borderCharsToArray({ topLeft: "┌", topRight: "┐", bottomLeft: "└", bottomRight: "┘", horizontal: "─", vertical: "│", topT: "┬", bottomT: "┴", leftT: "├", rightT: "┤", cross: "┼", }); <box customBorderChars={border}>...</box> ```
kerem 2026-03-02 23:43:52 +03:00
  • closed this issue
  • added the
    core
    label
Author
Owner

@kommander commented on GitHub (Aug 24, 2025):

Taking care of that.

<!-- gh-comment-id:3218297098 --> @kommander commented on GitHub (Aug 24, 2025): Taking care of that.
Author
Owner

@kommander commented on GitHub (Aug 24, 2025):

Will be in the next release

<!-- gh-comment-id:3218319274 --> @kommander commented on GitHub (Aug 24, 2025): Will be in the next release
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#15
No description provided.