Phaser API Documentation



Tells the Input system to set a custom cursor.

This cursor will be the default cursor used when interacting with the game canvas.

If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.

Any valid CSS cursor value is allowed, including paths to image files, i.e.:

this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer');

Please read about the differences between browsers when it comes to the file formats and sizes they support:

It's up to you to pick a suitable cursor format that works across the range of browsers you need to support.


name type description
cursor string

The CSS to be used when setting the default cursor.


This Input instance.

Since: 3.10.0