makepad-2-0-layout
यह क्या करती है
यह agent Makepad से बनी आपकी applications में visual elements को सजाने (layout) में मदद करता है। यह समझाता है कि components अपना size कैसे तय करते हैं और एक-दूसरे की जगह कैसे लेते हैं। इसके लिए 'layout turtle' नाम की व्यवस्था इस्तेमाल होती है।
कब इस्तेमाल करें
- ✓Makepad app का visual interface बनाते समय।
- ✓जब screen पर elements वैसे न दिखें जैसे आप चाहते हैं।
- ✓जब आप चाहते हों कि components सही मात्रा में जगह घेरें।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-layout/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं text को उपलब्ध width तक फैलाना चाहता हूँ, पर 500 pixels से ज़्यादा न हो। यह कैसे करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह 'layout turtle' व्यवस्था इस्तेमाल करता है। इसमें 'walk' तय करता है कि कोई component अपना size कैसे लेगा, और 'layout' तय करता है कि container अपने अंदर के children को कैसे लगाएगा। दिखावट कंट्रोल करने के लिए 'width', 'height', 'flow' और 'spacing' जैसी properties सेट की जाती हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
…
अक्सर पूछे जाने वाले सवाल
मेरा UI गायब क्यों हो जाता है?
ऐसा अक्सर तब होता है जब किसी container के अंदर 'height: Fill' लगाया जाता है, और उस container की अपनी height 'height: Fit' पर हो। नियम यह है: container पर 'height: Fit' रखें, जब तक parent की height तय न हो।
'Walk' और 'Layout' में क्या फ़र्क है?
'Walk' एक single component का size तय करता है (width, height)। 'Layout' तय करता है कि container के अंदर के components कैसे लगेंगे (दिशा, spacing, alignment)।
elements को ऊपर से नीचे कैसे लगाऊँ?
elements वाले container में `flow: Down` लिखें। उनके बीच की जगह `spacing` property से भी एडजस्ट कर सकते हैं।
जानकारी
लेखक का मूल विवरण
Makepad 2.0 guidance for layout; use when building or debugging Makepad UI code.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5142
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।