BorderSymbolStyle

BorderSymbolStyle decides which characters draw the box around a Card. Pick a named preset with style, or override individual characters through custom. Both can be combined — the preset fills in any characters that custom leaves unspecified.

Type Definition

  • style: A BorderStyle preset — "single", "double", "round", "bold", "singleDouble", or "doubleSingle".
  • custom: A Partial<CardBorderSymbols> object letting you override specific corners, dividers, or the horizontal/vertical bar characters.
type BorderSymbolStyle = {
  style?: BorderStyle;
  custom?: Partial<CardBorderSymbols>;
}

Usage

import { Card } from "ts-better-console";

const card = new Card("Hello", 30, {
border: {
symbols: {
style: "double",
custom: { horizontal: "~" },
},
},
}).render();

Want to support this project?

If you find ts-better-console useful and want to support its development, consider starring the GitHub repository or buying me a coffee! Your support helps me dedicate more time to improving the library and adding new features.

Want to contribute to this project?

Contributions are welcome! If you're interested in improving the library, fixing bugs, or adding new features, feel free to check out the GitHub repository and submit a pull request. Whether you're a seasoned developer or new to open source, your contributions can make a difference!