BorderOptions

BorderOptions controls everything about a Card border — the color and decoration of the border lines (style) and which set of box-drawing characters to use (symbols). Both properties are optional, so you can change either one independently.

Type Definition

  • style: A StyleOptions object applied to the border characters themselves — use this to give them a color or make them bold.
  • symbols: A BorderSymbolStyle object that chooses a built-in BorderStyle preset or supplies fully custom border characters via custom.
interface BorderOptions {
  style?: StyleOptions;
  symbols?: BorderSymbolStyle;
}

Usage

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

const card = new Card("Status: OK", 40, {
border: {
style: { color: "green" },
symbols: { style: "round" },
},
}).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!