Is it possible to add a div on top of the application canvas


Like adding a custom div/popup ui on top of a published playcanvas project inside the html.

I tried adding a html div to display on top of the canvas but it does not appear even though it shows in the elements in developer tools.


Hi @nasjarta,

Most likely your CSS rules aren’t correct. Check this example on how it adds a div and styles it to show in front of the canvas:


Wow thanks for this link Leonidas its really helpful!

Also do you know how I can add an external css library into playcanvas. Like for example I can add external scripts in editor but can I do the same for an external css?


Yes, you can add a .css file and load it in your code like this:

1 Like