GUI

There are a number of options for adding a GUI to Babylon.js. The Babylon.GUI is covered in this section. It allows you to place buttons and labels within in 3D space as well as a 2D front of screen GUI. When you want a GUI that works in VR or within the 3D space it the only option. It is integrated within the playground. For your own projects it has to be loaded as well as Babylon.js

Other possible GUIs are:

  1. CastorGUI a Babylon.js a community extension which overlays the scene
  2. Dat.GUI, an external interface
  3. HTML
Simple GUI Slider Example

An alternative 2D GUI is the extension CastorGUI. It has to be loaded both for the playground and for your own projects.

It can be found on github

CastorGUI Example

The external dat.GUI is integrated within the playground. For your own projects it has to be loaded as well as Babylon.js

dat.GUI Example

Since Babylon.js is in JavaScript it is possible to use HTML and CSS to overlay the Babylon.js scene

HTML GUI Example [Playground Example Simple HTML](https://www.babylonjs-playground.com/#1AHPN5)

Coming next

The Babylon GUI
Learn all about the Babylon.js 2D GUI system.
Scroll Viewer
Learn about Scroll Viewer in Babylon.js.
XML Loader
Learn about the Babylon.js XML Loader.
Selector
Learn about the selector in Babylon.js.
Babylon 3D GUI
Learn all about the Babylon.js 3D GUI System.