Javascript Articles

Page 180 of 534

How to create a canvas with crosshair cursor on hover over objects using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 856 Views

In this article, we are going to create a canvas with a crosshair cursor on hover using FabricJS. The crosshair is one of the native cursor styles available which can be used in FabricJS canvas. FabricJS provides various cursor types like default, all-scroll, crosshair, col-resize, row-resize etc., which reuse native CSS cursors. The hoverCursor property sets the cursor style when hovering over canvas objects. Syntax new fabric.Canvas(element: HTMLElement|String, { hoverCursor: String }: Object) Parameters element − This parameter is the element itself ...

Read More

How to create a canvas with not-allowed cursor on hover over objects using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 433 Views

In this article, we are going to create a canvas with a not-allowed cursor on hover using FabricJS. The not-allowed cursor is one of the native cursor styles available which can be used in FabricJS canvas. FabricJS provides various types of cursors like default, all-scroll, crosshair, col-resize, row-resize, etc., that reuse the native cursor under the hood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Canvas(element, { hoverCursor: "not-allowed" }) Parameters element − This ...

Read More

How to create a canvas with wait cursor on hover over objects using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 301 Views

In this article, we are going to create a canvas with a wait cursor on hover using FabricJS. The wait cursor is one of the native cursor styles available which can be used in FabricJS canvas. FabricJS provides various types of cursors such as default, all-scroll, crosshair, col-resize, row-resize, etc. that reuse the native cursor under the hood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Canvas(element: HTMLElement|String, { hoverCursor: String }: Object) Parameters ...

Read More

How to create a canvas with help cursor on hover over objects using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 450 Views

In this article, we are going to create a canvas with a help cursor on hover using FabricJS. The help cursor is one of the native cursor styles available which can be used in FabricJS canvas applications. FabricJS provides various types of cursors such as default, all-scroll, crosshair, col-resize, row-resize, etc. that reuse the native cursor under the hood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Canvas(element: HTMLElement|String, { hoverCursor: String }: Object) Parameters ...

Read More

How to create a canvas with progress cursor on hover over objects using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 471 Views

In this article, we are going to create a canvas with a progress cursor on hover using FabricJS. The progress cursor is one of the native cursor styles available which can be used in the FabricJS canvas too. FabricJS provides various types of cursors such as default, all-scroll, crosshair, col-resize, row-resize, etc. that reuse the native cursor under the hood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Canvas(element: HTMLElement|String, { hoverCursor: String }: Object) Parameters ...

Read More

How to create a canvas with text cursor on hover over objects using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 1K+ Views

In this article, we are going to create a canvas with a text cursor on hover using FabricJS. The text cursor is one of the native cursor styles available which can be used in the FabricJS canvas. FabricJS provides various types of cursors such as default, all-scroll, crosshair, col-resize, row-resize, etc. that reuse the native cursor under the hood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Canvas(element: HTMLElement|String, { hoverCursor: String }: Object) Parameters ...

Read More

How to disable the interactivity of canvas using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 2K+ Views

In this article, we are going to learn how to disable the interactivity of canvas in FabricJS. The interactive layer on top of each object is one of the unique features of FabricJS. As soon as we initialize a canvas, it's possible to select the objects, drag them around or manipulate a group selection. However, all this can be undone by assigning the interactive property to False. Syntax new fabric.Canvas(element: HTMLElement|String, { interactive : Boolean }: Object) Parameters element − This parameter is ...

Read More

How to set the border color of a selection area on a canvas using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 907 Views

In this article, we are going to learn how to set the border color of a selection area on a canvas using FabricJS. A selection indicates whether a group selection should be enabled or not. FabricJS allows us to adjust the border color accordingly with the selectionBorderColor property. Syntax new fabric.Canvas(element: HTMLElement|String, { selectionBorderColor: String }: Object) Parameters element − This parameter is the element itself which can be derived using document.getElementById() or the id of the ...

Read More

How to set the color of a selection area on a canvas using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 923 Views

In this article, we are going to learn how to set the color of a selection area on a canvas using FabricJS. We can adjust the color using the selectionColor property. Syntax new fabric.Canvas(element: HTMLElement|String, { selectionColor: String }: Object) Parameters element − This parameter is the element itself which can be derived using document.getElementById() or the id of the element itself. The FabricJS canvas will be initialized on this element. ...

Read More

How to set the width of a selection area border on a canvas using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 833 Views

In this article, we are going to learn how to set the width of a selection area border on a canvas using FabricJS. A selection area indicates the area selected using the mouse and all objects under that area will get selected. FabricJS allows us to adjust the width of the selection area border with the selectionLineWidth property. Syntax new fabric.Canvas(element: HTMLElement|String, { selectionLineWidth: Number }: Object) Parameters element − This parameter is the element itself which can be derived using document.getElementById() ...

Read More
Showing 1791–1800 of 5,340 articles
« Prev 1 178 179 180 181 182 534 Next »
Advertisements