It is text. You can define its color, its size, its font...
const text = canvasUI.view.new("text-1", "text") text.set("text", "Hello World!") text.set("font", { family: "Poppins", size: 24, weight: 700, }) text.set("color", "#14213d")
It is the text that has to draw. Its default value is:
"Text"
It is the font of the text. It is an object that has these properties:
Its default value is:
{ family: "Courier New", size: 16, weight: 400 }
It is the color of the text. Its default value is:
"#000"
This property is useful when the text doesn't fit in its parent. It defines how the text has to be aligned. It is an object with these properties:
"left"
, "middle"
and "right"
."top"
, "middle"
and "bottom"
.Its default value is:
{ horizontal: "left", vertical: "middle" }