godot-ui
Skill54 starsChanged 14 days agoMITView on GitHub
Build Godot 4.7 user interfaces that work on PC, mobile and console - anchors and containers, responsive stretch settings, safe areas, Themes and type variations, gamepad/keyboard focus navigation, offset_transform animation (4.7), RichTextLabel, localization, accessibility (screen readers), drag and drop, HUD over 3D. Use for menus, HUDs, inventories, settings screens or any Control node work.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- edemaistre/godot-expert-skillstheir own version, first seen Nov 29, 2026
- MindsMaster/godot-claude-code-skillstheir own version, first seen Oct 25, 2026
- jame581/GodotPromptertheir own version, first seen Oct 21, 2026
- pbzona/godot-skillstheir own version, first seen Oct 20, 2026
- vl4dt/godot-skillstheir own version, first seen Jun 21, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- jame581/GodotPrompter★ 965same name
- edemaistre/godot-expert-skills★ 8same name
- vl4dt/godot-skills★ 8same name
- MindsMaster/godot-claude-code-skills★ 3same name
- pbzona/godot-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- godot-2dSkill
- godot-3d-gameplaySkill
- godot-3d-renderingSkill
- godot-addonsSkill
- godot-animationSkill
- godot-architectureSkill
- godot-audioSkill
- godot-coreSkill
- godot-csharpSkill
- godot-editor-toolingSkill
- godot-export-ciSkill
- godot-game-feelSkill
- godot-gdscriptSkill
- godot-inputSkill
- godot-migrationSkill
- godot-mobile-webSkill
- godot-modding-dlcSkill
- godot-narrativeSkill
- godot-navigation-aiSkill
- godot-networkingSkill
- godot-performanceSkill
- godot-physicsSkill
- godot-proceduralSkill
- godot-shaders-vfxSkill
- godot-testing-debugSkill
- godot-xrSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Containers do the layout: Use VBoxContainer/HBoxContainer, GridContainer, MarginContainer (padding), PanelContainer (background), …
- Very specific: line 34
Every interactive control needs focus_mode = FOCUS_ALL.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
UI (4.7)
Build UI as scenes (ui/hud/hud.tscn) made in the editor, or with ../godot-core/scripts/scene_edit.py. Scripts only fill in data and react. Input actions and gamepads are in godot-input.
Layout fundamentals
- Containers do the layout. Use
VBoxContainer/HBoxContainer,GridContainer,MarginContainer(padding),PanelContainer(background),CenterContainer,ScrollContainer,FlowContainer(wrapping tags/items),AspectRatioContainer,TabContainer,FoldableContainer(4.5+) andSplitContainer. Children of containers ignore their own anchors and position. - Size flags decide each child's share:
size_flags_horizontal = SIZE_EXPAND_FILL(+size_flags_stretch_ratio),SIZE_SHRINK_CENTER, and so on.custom_minimum_sizesets a floor. - The root of a UI scene is a
Controlwithset_anchors_and_offsets_preset(PRESET_FULL_RECT). HUD corners use anchor presets (PRESET_TOP_LEFT…) plus a MarginContainer. - To animate or juice controls inside containers, use the 4.7
offset_transform_*properties (offset_transform_enabled,_position,_rotation,_scale,_pivot_ratio,_visual_only). Containers don't overwrite them, unlikeposition/scale.pivot_offset_ratio(4.6+) sets a pivot as a fraction of size, so (0.5, 0.5) is the center. mouse_filter:STOP(default for most),PASS, orIGNOREfor decorative overlays that would otherwise block clicks to the game. Usemouse_behavior_recursive/focus_behavior_recursive(4.5+) to disable a whole subtree.
Multi-resolution and devices
- New 4.7 projects use stretch mode
canvas_items+ aspectexpand. Design at 1920×1080 (or 1280×720) and anchor to edges so wider and taller screens just reveal more space. Pixel-art games useviewport+ integer scaling (seegodot-2d). - Mobile safe area (notches): read
DisplayServer.get_display_safe_area()and pad the root MarginContainer (see the reference). - Text size: minimum ~24 px at 1080p for TV/console legibility, and touch targets of at least ~48 px at the base resolution.
Window.content_scale_factorgives a user-facing "UI scale" option.
Theme instead of per-node overrides
- Make one
Themeresource (ui/theme/main_theme.tres) and set it on the root Control, or project-wide ingui/theme/custom. Define default fonts, sizes and StyleBoxes there. - Variants: set
theme_type_variation = &"DangerButton"on a node, and defineDangerButton(base typeButton) in the theme. This is better than scatteredadd_theme_*_overridecalls. - Fonts: use
FontFilewithFontVariationfor weight and spacing. For crisp text at any scale, enable MSDF on the font import (great for world-space labels).
Focus and navigation (required for gamepad and console)
- Every interactive control needs
focus_mode = FOCUS_ALL. Callgrab_focus()on the first button when a menu opens. 4.6+ separates mouse and keyboard focus:grab_focus(true)focuses without showing the outline. - Godot picks neighbors automatically, by geometry. Override them with
focus_neighbor_*/focus_nextin grids and odd layouts. - Built-in actions
ui_accept,ui_cancel,ui_up/down/left/right,ui_focus_nextalready map to arrows, Enter, Escape and gamepad. Add your own bindings to them, never replace them. - Track focus with
get_viewport().gui_focus_changed, for example for sounds or scrolling into view. Make sure no menu is ever left with nothing focused.
Text
Label(autowrap_mode,text_overrun_behavior,LabelSettingsfor outline and shadow, stacked effects in 4.5+),RichTextLabel(bbcode_enabled,append_text,[url]+meta_clicked,[img height=1em]in 4.7, custom effects).- Localization: write keys or English source text, then
tr("KEY")/tr_n(). Nodes auto-translate their text (auto_translate_mode). Add.poor.csvfiles in Project Settings → Localization, and switch withTranslationServer.set_locale("de"). C#Tr()strings are extracted to POT too (4.6+).
Accessibility (4.5+, AccessKit)
Standard controls are announced automatically. Give icon-only buttons accessibility_name, use accessibility_description for extra context and accessibility_live for changing status text. Keep focus order logical, because screen readers follow it.
HUD over 3D and world-space UI
- HUD: a
CanvasLayerwith your Control tree, so it ignores the camera. - World-space health bars: either
Label3D/Sprite3D(billboard), or aSubViewportholding Controls rendered to aViewportTextureon a quad. Projecting a 3D point withcamera.unproject_position()onto a 2D control is also cheap.
Common mistakes
- Setting
position/sizeon children of containers (it gets overwritten). Use size flags, minimum size or offset transforms instead. - Full-screen invisible Controls with
mouse_filter = STOPthat block game input. - Menus that can't be closed or navigated without a mouse.
- Hard-coded strings in code that never pass through
tr().
Responsive layout, menu focus, tweened buttons, inventory drag and drop, safe area (compiled by the tests): references/patterns.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

