How you do UI in Defold?

In Defold, UI is usually done with GUI component: consisting of nodes, layouts, and a GUI script. It is more code-driven than CSS/HTML, so positioning, scaling, anchoring, and state changes are typically handled in Lua, in the GUI script.

For simple UI, the built-in GUI system is enough. You have box nodes that support 9-slice, texutres, nodes support stencils, there are also radial pie nodes, and text nodes with any font. You can also use particles in GUI and spine animations (with Spine Extension).

For more structured UI, many people use libraries like the mentioned Druid or Gooey, which gives you ready components like buttons, grids, scrolls, sliders, data lists, etc. There is also one new approach to GUI in Defold - the “Flow” framework:

Defold GUI Manual is a good starting point:

Some good tips:

Video Tutorials about GUI:

4 Likes