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.
- Fabric.js | Ellipse visible Property
- Fabric.js | Rect visible Property
- jQuery | :visible Selector
- How to check an element is visible or not using jQuery?
- How to check if a scrollbar is visible?
- How to check if an element is visible in DOM ?
- How to select all visible or hidden elements in a HTML page using jQuery ?
- How to check an element with ng-if is visible on DOM ?
- How to fix number of visible items in HTML dropdown and allow multiple selections ?
- How to hide/visible the backside of a rotated div element using CSS ?
- Text Animation with changing the color of the text using HTML & CSS
- How to create long shadow of text without using text-shadow in HTML and CSS ?
- How to embed text and text boxes in New Google Sites ?
- CSS | text-align Property
- CSS | text-decoration Property
- CSS | text-decoration-color Property
- CSS | text-decoration-line Property
- CSS | text-justify Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.