In this article, we are going to see how to add shadow to the text canvas using FabricJS. The canvas means text written is movable, rotatable, resizable, and can be stretched. But in this article, we will add shadow to it. Further, the text itself cannot be edited like a textbox.
fabric.text(text :string, shadow: fabric.shadow);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text content.
- shadow: It specifies the shadow object.
Program: This example uses FabricJS to add shadow to the text canvas.
- How to create long shadow of text without using text-shadow in HTML and CSS ?
- CSS | text-shadow Property
- Create a Glowing text shadow using HTML and CSS
- How to add shadow to text using CSS ?
- CSS | box-shadow Property
- Fabric.js | Ellipse shadow Property
- Fabric.js | Rect shadow Property
- How to add shadow to a canvas circle using Fabric.js ?
- CSS | Shadow Effect
- How to style icon color, size, and shadow by using CSS ?
- How to add a box-shadow on one side of an element using CSS?
- Drop shadow for PNG image using CSS
- How to do box shadow with progress bar style using bootstrap?
- CSS | drop-shadow() Function
- How to apply colored shadow and border properties to a grayscale image?
- Materialize CSS - Pulse and Shadow
- What is shadow root and how to use it ?
- Text Animation with changing the color of the text using HTML & CSS
- How to embed text and text boxes in New Google Sites ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.