makepad-2-0-layout
Lets your agent manage layout in Makepad 2.0. It's useful for arranging visual elements when building or debugging user interfaces.
What it does
This agent helps you arrange visual elements (layout) in your applications built with Makepad. It explains how components size themselves and position each other, using a system called 'layout turtle'.
When to use it
- ✓When creating the visual interface of a Makepad app.
- ✓When elements on the screen don't appear as expected.
- ✓When trying to make components occupy the correct amount of space.
Example of what to ask your AI
“How do I make text fill the available width but not exceed 500 pixels?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It uses a 'layout turtle' system that defines how components size themselves ('walk') and how a container arranges its children ('layout'). You set properties like 'width', 'height', 'flow', and 'spacing' to control the appearance.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill makepad-2-0-layoutOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-layout/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Limitations
- Verify against current Makepad 2.0 docs; upstream APIs change frequently.
- Do not run bundled scripts without explicit user approval.
When to Use
- Use when this upstream workflow matches the user's stated goal.
- Use when the task requires the procedures documented in this skill.
Makepad 2.0 Layout System
Makepad uses a layout turtle system -- not CSS flexbox, not CSS grid. The turtle walks through children one by one, placing each widget according to two core concepts:
- Walk -- how a widget sizes itself (width, height, margin)
- Layout -- how a container arranges its children (flow, spacing, padding, align)
Every container widget (View, SolidView, RoundedView, ScrollYView, etc.) has both Walk properties (its own size) and Layout properties (how it lays out children).
Walk System (Widget Sizing)
Walk controls how an individual widget claims space inside its parent.
width / height
| Syntax | Meaning |
|---|---|
width: Fill |
Fill all remaining horizontal space (default) |
width: Fit |
Shrink to fit content |
width: 200 |
Fixed 200 pixels |
width: Fill{min: 100 max: 500} |
Fill with constraints |
width: Fit{max: Abs(300)} |
Fit content, capped at 300px |
height: Fill |
Fill all remaining vertical space (default) |
height: Fit |
Shrink to fit content |
height: 100 |
Fixed 100 pixels |
use mod.prelude.widgets.*
// Fill: takes all available width
View{
width: Fill height: Fit
flow: Down
Label{text: "I stretch to fill the width"}
}
// Fit: shrinks to content
View{
width: Fit height: Fit
padding: 10
Label{text: "I am only as wide as this text"}
}
// Fixed: exact pixel size
View{
width: 300 height: 200
Label{text: "I am exactly 300x200 pixels"}
}
// Constrained Fill: fills but within bounds
View{
width: Fill{min: 200 max: 600} height: Fit
flow: Down padding: 16
Label{text: "I fill available space but stay between 200-600px"}
}
CRITICAL: height: Fit on Containers
This is the number one layout bug in Makepad.
The default height is Fill. When your output renders inside a Fit container,
Fill inside Fit creates a circular dependency and resolves to 0 pixels.
Your entire UI becomes invisible.
Rule: ALWAYS set height: Fit on every View, SolidView, RoundedView, and similar
container unless the parent has a fixed or Fill height.
// CORRECT -- height: Fit makes the container visible
View{
width: Fill height: Fit
flow: Down padding: 10
Label{text: "I am visible"}
}
// WRONG -- defaults to height: Fill, resolves to 0px, invisible
View{
width: Fill
flow: Down padding: 10
Label{text: "I am invisible (0px tall)"}
}
Exceptions where height: Fill is acceptable:
- Inside a fixed-height parent:
View{
height: 400
View{
height: Fill
Label{text: "I fill the 400px parent"}
}
}
- Inside a
height: Fillchain that ultimately reaches a known size (e.g., Window body). - ScrollYView always uses
height: Fillbecause it must fill its parent to scroll.
margin
Margin adds space around the outside of a widget.
// Uniform margin on all sides
Label{text: "Hello" margin: 10}
// Selective margin with Inset
Label{
text: "Indented"
margin: Inset{top: 5 bottom: 5 left: 20 right: 20}
}
// Zero margin (note the trailing dot for float literal)
Label{text: "Flush" margin: 0.}
Layout System (Child Arrangement)
Layout controls how a container positions its children.
flow (Direction)
| Syntax | Meaning | CSS Equivalent |
|---|---|---|
flow: Right |
Left-to-right, single line (default) | flex-direction: row |
flow: Down |
Top-to-bottom, single column | flex-direction: column |
flow: Overlay |
Stack children on top of each other | position: absolute stacking |
flow: Flow.Right{wrap: true} |
Left-to-right with wrapping | flex-wrap: wrap |
flow: Flow.Down{wrap: true} |
Top-to-bottom with wrapping | column wrap |
use mod.prelude.widgets.*
// Vertical stack (most common)
View{
width: Fill height: Fit
flow: Down spacing: 10
Label{text: "First"}
Label{text: "Second"}
Label{text: "Third"}
}
// Horizontal row
View{
width: Fill height: Fit
flow: Right spacing: 10
Label{text: "Left"}
Label{text: "Center"}
Label{text: "Right"}
}
// Overlay -- children stacked on top of each other
…
FAQ
Why does my UI disappear?
This often happens when you use 'height: Fill' inside a container that also has 'height: Fit'. The rule is: use 'height: Fit' on containers unless the parent has a defined height.
What's the difference between 'Walk' and 'Layout'?
'Walk' defines the size of a single component (width, height). 'Layout' defines how a container arranges the components inside it (direction, spacing, alignment).
How do I stack elements vertically?
Use `flow: Down` within the container holding the elements. You can also adjust the space between them using the `spacing` property.
Details
Original description by the author
Makepad 2.0 guidance for layout; use when building or debugging Makepad UI code.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3528
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
angular-developer
Helps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
affaan-m/ECC
frontend-a11y
Helps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
affaan-m/ECC
frontend-patterns
Has your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.
affaan-m/ECC