Repository navigation
Anchors and Responsive Layouts
Minecraft windows come in all sizes, and players change GUI Scale. Anchors decide how your controls react when the space around them changes size.
An anchor doesn't move a control to an edge. It keeps the distance you drew between the control and that edge.
If you draw a close button 10 px from a panel's right edge and anchor it right, it stays 10 px from the right edge however wide the panel gets. To pin something into a corner, place it in the corner first, then anchor it.
Set these under Layout in Properties.
| Horizontal | Vertical | Behavior |
|---|---|---|
| left (default) | top (default) | Keeps its distance from the left / top edge. |
| right | bottom | Keeps its distance from the right / bottom edge. |
| center | center | Keeps its offset from the center. |
| stretch | stretch | Keeps both margins and changes size. Minimum width / height stop it shrinking too far. |
Anchors are measured from the control's parent panel, or from the screen for controls that aren't inside a panel. See Panels and parenting.
- Orange guides: with one control selected, solid orange lines run from it to each edge it's pinned to, and a dashed line marks the center line for center.
- Live resizing: drag a panel's resize handles and its children move and stretch by their anchors as you drag. Hold Ctrl to resize the panel alone.
- Typing sizes: changing a panel's Width or Height in Properties, or the screen's Width or Height in Screen settings, reflows the controls the same way. Each resize is one Undo step.
The editor uses the same layout rules as Minecraft, so what you see while resizing is what players get.
- Click Screen settings and tick Responsive layout.
- The screen's Width and Height become its design size. In Minecraft, the screen is laid out at the available GUI size (minus a small margin for the frame), and every control moves by its anchor.
- Try it without launching the game: in Preview, type a width and height under Layout size (GUI pixels) and click Apply size.
Without Responsive layout, a screen keeps its fixed size. Fit to viewport then scales it down if the window is too small. In a web game (web page, desktop app, Arcadia, itch.io) it also grows the screen to fill the page: a whole-number scale (2x, 3x…) while that leaves less than 12% of the room unused, otherwise exactly the size that fits, so a phone isn't left showing the game at 1x in a corner. Pixel art stays sharp either way. A web game without a frame uses the whole page, with no margin. In Minecraft it only ever shrinks: menus follow the player's GUI Scale.
| Control | Anchors |
|---|---|
| Background panel | stretch / stretch |
| Title label | stretch / top |
| Close button | right / top |
| Main list or content area | stretch / stretch |
| Footer buttons | left or right / bottom |
- Anchors don't wrap controls onto new rows and don't switch layouts at breakpoints.
- Minimum sizes can make content overflow on very small windows.
- Item List row templates support anchors too: the template's width is the design width, and rows adapt to the list's real width. See Item lists and row templates.
- Existing fixed screens are unchanged until you turn on Responsive layout.
Arcadia Studio manual · Minecraft 1.21.1 / NeoForge · Home · Keyboard shortcuts · Troubleshooting
Getting started
Designing
- Projects and screens
- Controls
- Canvas editing
- Properties and appearance
- Layers and groups
- Panels and parenting
- Anchors and responsive
- Align and distribute
- Components
- Assets and items
- Pixel art and sprites
- Music and sound effects
- Speech and video
- Item lists
Behavior
Shipping
- Exporting and installing
- Web and desktop apps
- Publishing to Arcadia
- Leaderboard pages
- Publishing to itch.io
- Advanced tools
- KubeJS
- Security
Extras