Antigravity-awesome-skills makepad-layout
install
source · Clone the upstream repo
git clone https://github.com/sickn33/antigravity-awesome-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sickn33/antigravity-awesome-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/antigravity-awesome-skills-claude/skills/makepad-layout" ~/.claude/skills/sickn33-antigravity-awesome-skills-makepad-layout && rm -rf "$T"
manifest:
plugins/antigravity-awesome-skills-claude/skills/makepad-layout/SKILL.mdsource content
Makepad Layout Skill
Version: makepad-widgets (dev branch) | Last Updated: 2026-01-19
Check for updates: https://crates.io/crates/makepad-widgets
You are an expert at Makepad layout system. Help users by:
- Writing code: Generate layout code following the patterns below
- Answering questions: Explain layout concepts, sizing, flow directions
When to Use
- You need to size, align, or position widgets in a Makepad UI.
- The task involves
,Walk
,Align
,Fit
, padding, spacing, or container flow configuration.Fill - You want Makepad-specific layout solutions for centering, responsiveness, or composition.
Documentation
Refer to the local files for detailed documentation:
- Complete layout reference./references/layout-system.md
- Walk, Align, Margin, Padding types./references/core-types.md
IMPORTANT: Documentation Completeness Check
Before answering questions, Claude MUST:
- Read the relevant reference file(s) listed above
- If file read fails or file is empty:
- Inform user: "本地文档不完整,建议运行
更新文档"/sync-crate-skills makepad --force - Still answer based on SKILL.md patterns + built-in knowledge
- Inform user: "本地文档不完整,建议运行
- If reference file exists, incorporate its content into the answer
Key Patterns
1. Basic Layout Container
<View> { width: Fill height: Fill flow: Down padding: 16.0 spacing: 8.0 <Label> { text: "Item 1" } <Label> { text: "Item 2" } }
2. Centering Content
<View> { width: Fill height: Fill align: { x: 0.5, y: 0.5 } <Label> { text: "Centered" } }
3. Horizontal Row Layout
<View> { width: Fill height: Fit flow: Right spacing: 10.0 align: { y: 0.5 } // Vertically center items <Button> { text: "Left" } <View> { width: Fill } // Spacer <Button> { text: "Right" } }
4. Fixed + Flexible Layout
<View> { width: Fill height: Fill flow: Down // Fixed header <View> { width: Fill height: 60.0 } // Flexible content <View> { width: Fill height: Fill // Takes remaining space } }
Layout Properties Reference
| Property | Type | Description |
|---|---|---|
| Size | Width of element |
| Size | Height of element |
| Padding | Inner spacing |
| Margin | Outer spacing |
| Flow | Child layout direction |
| f64 | Gap between children |
| Align | Child alignment |
| bool | Clip horizontal overflow |
| bool | Clip vertical overflow |
Size Values
| Value | Description |
|---|---|
| Size to fit content |
| Fill available space |
| Fixed size in pixels |
| Explicit fixed size |
Flow Directions
| Value | Description |
|---|---|
| Top to bottom (column) |
| Left to right (row) |
| Stack on top |
Align Values
| Value | Position |
|---|---|
| Top-left |
| Top-center |
| Top-right |
| Middle-left |
| Center |
| Middle-right |
| Bottom-left |
| Bottom-center |
| Bottom-right |
Box Model
+---------------------------+ | margin | | +---------------------+ | | | padding | | | | +---------------+ | | | | | content | | | | | +---------------+ | | | +---------------------+ | +---------------------------+
When Writing Code
- Use
for flexible containers,Fill
for content-sized elementsFit - Set
for vertical,flow: Down
for horizontalflow: Right - Use empty
as spacer in row layouts<View> { width: Fill } - Always set explicit dimensions on fixed-size elements
- Use
to position children within containeralign
When Answering Questions
- Makepad uses a "turtle" layout model - elements laid out sequentially
takes all available space,Fill
shrinks to contentFit- Unlike CSS flexbox, there's no flex-grow/shrink - use Fill/Fit
- Alignment applies to children, not the element itself
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.