How to use HTML react GUI

I am using react-babylonjs and am finding the babylon 2d UI to be hard making it look good. Does anyone know if it possible to incorporate a react-ui as the HTML/UI . That way I could even use a css framework/library using those components. But don’t know how to connet the HTML GUI with react.

I am not sure to understand, the question is about how to connect React to normal HTML elements ?

1 Like

I’m sorry, my question was poorly formulated.

Does anyone have code for placing react components on top of the canvas used for babylon rendering. The reason I am asking is because I am using the react-babylonjs library. And the 2d ui components (like rectangle, button etc) that you put inside a adtFullscreenUi isn’t as nice looking and a bit hard for me to control.

Something like the https://brianzinn.github.iano/react-babylonjs/?path=/story/gui--html-text example but for 2d UI.

If that makes more sense?

Yup definitely, you should be able to do it with css, maybe @brianzinn has some examples handy ?

Check this repo with live site. The DOM on the canvas optionally carries over to AR with DOM overlay:

1 Like

Hello @Todilo just checking in, was your question solved? :smiley:

Yes, thank you! I didn’t really get the performance I was looking for and not all the components was available with the same customization, but it was good enough.

1 Like