makepad-2-0-layout
Qué hace
Este agente te ayuda a organizar los elementos visuales (el layout) en tus aplicaciones creadas con Makepad. Explica cómo los componentes se ajustan de tamaño y se colocan unos respecto a otros, usando un sistema llamado 'layout turtle'.
Cuándo usarla
- ✓Al crear la interfaz visual de una app de Makepad.
- ✓Cuando los elementos de la pantalla no aparecen como esperas.
- ✓Cuando intentas que los componentes ocupen el espacio adecuado.
Link de la skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-layout/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Cómo hago que un texto ocupe todo el ancho disponible sin superar los 500 píxeles?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Usa un sistema de 'layout turtle' que define cómo se dimensionan los componentes ('walk') y cómo un contenedor organiza a sus elementos internos ('layout'). Configuras propiedades como 'width', 'height', 'flow' y 'spacing' para controlar el aspecto.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
…
Preguntas frecuentes
¿Por qué desaparece mi interfaz?
Suele pasar cuando usas 'height: Fill' dentro de un contenedor que también tiene 'height: Fit'. La regla es: usa 'height: Fit' en los contenedores, salvo que el elemento padre tenga una altura definida.
¿Cuál es la diferencia entre 'Walk' y 'Layout'?
'Walk' define el tamaño de un componente individual (ancho y alto). 'Layout' define cómo un contenedor organiza los componentes que tiene dentro (dirección, espaciado, alineación).
¿Cómo apilo los elementos verticalmente?
Usa `flow: Down` en el contenedor que tiene los elementos. También puedes ajustar el espacio entre ellos con la propiedad `spacing`.
Detalles
Descripción original del autor
Makepad 2.0 guidance for layout; use when building or debugging Makepad UI code.
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #5142
- Licencia
- MIT
- Actualizada
- 15/10/2026
Comentarios
- …
Más skills de este repositorio
00-andruia-consultant
48 milAyuda a tu agente a iniciar o mejorar proyectos de IA. Analiza código, sugiere herramientas y crea planes de acción en español.
007
48 milPermite que tu agente realice auditorías de seguridad y modelado de amenazas. Es útil para proteger proyectos contra ataques y vulnerabilidades.
10-andruia-skill-smith
48 milAyuda a tu agente a crear o mejorar herramientas de IA. Define cómo funcionan, escribe la documentación y valida la estructura.
20-andruia-niche-intelligence
48 milPermite que tu agente cree un resumen de un sector específico. Es útil para entender su contexto, normas, patrones de uso y riesgos, usando fuentes fiables.
Skills parecidas
angular-developer
280 milAyuda a tu agente con código de Angular y la estructura del proyecto. Útil para empezar proyectos, crear partes de código o mejorar el rendimiento y la accesibilidad.
frontend-a11y
280 milAyuda a tu agente a hacer que las interfaces web sean accesibles para todos. Asegura que sitios y apps funcionen bien con lectores de pantalla y navegación por teclado.
frontend-patterns
280 milHace que tu agente aplique patrones modernos en desarrollo frontend. Optimiza el rendimiento, gestiona el estado y sigue buenas prácticas en React y Next.js.