create
Creates a Style object with optional formatting and color properties. Styles are cached for performance.
Example
ts
import { Style } from "@monstermann/signals-tui";
const plain = Style.create();
const red = Style.create({ fg: "red" });
const errorStyle = Style.create({
fg: "white",
bg: "red",
bold: true,
});
const styled = Style.create({
fg: "blue",
bold: true,
underline: true,
italic: true,
});Available Colors
black,red,green,yellow,blue,magenta,cyan,whitebrightBlack,brightRed,brightGreen,brightYellow,brightBlue,brightMagenta,brightCyan,brightWhite
Available Properties
fg- Foreground colorbg- Background colorbold- Bold textdim- Dim textitalic- Italic textunderline- Underlined textstrikethrough- Strikethrough textinverse- Inverse colorshidden- Hidden textoverline- Overlined text