Fabric.js | Text visible Property
In this article, we are going to see how to toggle the visibility of a text canvas using FabricJS. The canvas means text written is movable, rotatable, resizable, and can be stretched. But in this article, we will toggle the visibility of the text. Further, the text itself cannot be edited like a textbox.
fabric.text(text :string, visible: boolean);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text.
- visible: It specifies the visibility of the text content. It contains a boolean value.
Program: This example uses FabricJS text visible property to make the visibility of text.