[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-7c501225-124e-4f8a-b977-9b7df12f6742":3,"$fDk_YsoeFTiyO6le4n1Zc2xehbfVe91k1JRbY9J9pVzk":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"7c501225-124e-4f8a-b977-9b7df12f6742","makepad-layout","|","cat_design_ui","mod_design","sickn33,design","---\nname: makepad-layout\ndescription: |\n  CRITICAL: Use for Makepad layout system. Triggers on:\n  makepad layout, makepad width, makepad height, makepad flex,\n  makepad padding, makepad margin, makepad flow, makepad align,\n  Fit, Fill, Size, Walk, \"how to center in makepad\",\n  makepad 布局, makepad 宽度, makepad 对齐, makepad 居中\nrisk: safe\nsource: community\n---\n\n# Makepad Layout Skill\n\n> **Version:** makepad-widgets (dev branch) | **Last Updated:** 2026-01-19\n>\n> Check for updates: https:\u002F\u002Fcrates.io\u002Fcrates\u002Fmakepad-widgets\n\nYou are an expert at Makepad layout system. Help users by:\n- **Writing code**: Generate layout code following the patterns below\n- **Answering questions**: Explain layout concepts, sizing, flow directions\n\n## When to Use\n- You need to size, align, or position widgets in a Makepad UI.\n- The task involves `Walk`, `Align`, `Fit`, `Fill`, padding, spacing, or container flow configuration.\n- You want Makepad-specific layout solutions for centering, responsiveness, or composition.\n\n## Documentation\n\nRefer to the local files for detailed documentation:\n- `.\u002Freferences\u002Flayout-system.md` - Complete layout reference\n- `.\u002Freferences\u002Fcore-types.md` - Walk, Align, Margin, Padding types\n\n## IMPORTANT: Documentation Completeness Check\n\n**Before answering questions, Claude MUST:**\n\n1. Read the relevant reference file(s) listed above\n2. If file read fails or file is empty:\n   - Inform user: \"本地文档不完整，建议运行 `\u002Fsync-crate-skills makepad --force` 更新文档\"\n   - Still answer based on SKILL.md patterns + built-in knowledge\n3. If reference file exists, incorporate its content into the answer\n\n## Key Patterns\n\n### 1. Basic Layout Container\n\n```rust\n\u003CView> {\n    width: Fill\n    height: Fill\n    flow: Down\n    padding: 16.0\n    spacing: 8.0\n\n    \u003CLabel> { text: \"Item 1\" }\n    \u003CLabel> { text: \"Item 2\" }\n}\n```\n\n### 2. Centering Content\n\n```rust\n\u003CView> {\n    width: Fill\n    height: Fill\n    align: { x: 0.5, y: 0.5 }\n\n    \u003CLabel> { text: \"Centered\" }\n}\n```\n\n### 3. Horizontal Row Layout\n\n```rust\n\u003CView> {\n    width: Fill\n    height: Fit\n    flow: Right\n    spacing: 10.0\n    align: { y: 0.5 }  \u002F\u002F Vertically center items\n\n    \u003CButton> { text: \"Left\" }\n    \u003CView> { width: Fill }  \u002F\u002F Spacer\n    \u003CButton> { text: \"Right\" }\n}\n```\n\n### 4. Fixed + Flexible Layout\n\n```rust\n\u003CView> {\n    width: Fill\n    height: Fill\n    flow: Down\n\n    \u002F\u002F Fixed header\n    \u003CView> {\n        width: Fill\n        height: 60.0\n    }\n\n    \u002F\u002F Flexible content\n    \u003CView> {\n        width: Fill\n        height: Fill  \u002F\u002F Takes remaining space\n    }\n}\n```\n\n## Layout Properties Reference\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `width` | Size | Width of element |\n| `height` | Size | Height of element |\n| `padding` | Padding | Inner spacing |\n| `margin` | Margin | Outer spacing |\n| `flow` | Flow | Child layout direction |\n| `spacing` | f64 | Gap between children |\n| `align` | Align | Child alignment |\n| `clip_x` | bool | Clip horizontal overflow |\n| `clip_y` | bool | Clip vertical overflow |\n\n## Size Values\n\n| Value | Description |\n|-------|-------------|\n| `Fit` | Size to fit content |\n| `Fill` | Fill available space |\n| `100.0` | Fixed size in pixels |\n| `Fixed(100.0)` | Explicit fixed size |\n\n## Flow Directions\n\n| Value | Description |\n|-------|-------------|\n| `Down` | Top to bottom (column) |\n| `Right` | Left to right (row) |\n| `Overlay` | Stack on top |\n\n## Align Values\n\n| Value | Position |\n|-------|----------|\n| `{ x: 0.0, y: 0.0 }` | Top-left |\n| `{ x: 0.5, y: 0.0 }` | Top-center |\n| `{ x: 1.0, y: 0.0 }` | Top-right |\n| `{ x: 0.0, y: 0.5 }` | Middle-left |\n| `{ x: 0.5, y: 0.5 }` | Center |\n| `{ x: 1.0, y: 0.5 }` | Middle-right |\n| `{ x: 0.0, y: 1.0 }` | Bottom-left |\n| `{ x: 0.5, y: 1.0 }` | Bottom-center |\n| `{ x: 1.0, y: 1.0 }` | Bottom-right |\n\n## Box Model\n\n```\n+---------------------------+\n|         margin            |\n|  +---------------------+  |\n|  |      padding        |  |\n|  |  +---------------+  |  |\n|  |  |   content     |  |  |\n|  |  +---------------+  |  |\n|  +---------------------+  |\n+---------------------------+\n```\n\n## When Writing Code\n\n1. Use `Fill` for flexible containers, `Fit` for content-sized elements\n2. Set `flow: Down` for vertical, `flow: Right` for horizontal\n3. Use empty `\u003CView> { width: Fill }` as spacer in row layouts\n4. Always set explicit dimensions on fixed-size elements\n5. Use `align` to position children within container\n\n## When Answering Questions\n\n1. Makepad uses a \"turtle\" layout model - elements laid out sequentially\n2. `Fill` takes all available space, `Fit` shrinks to content\n3. Unlike CSS flexbox, there's no flex-grow\u002Fshrink - use Fill\u002FFit\n4. Alignment applies to children, not the element itself\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,248,988,"2026-05-16 13:27:38",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"设计创意","design","mdi-palette-outline","UI 设计、生成艺术、品牌视觉等创意 Skill",3,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"UI 设计","ui-design","mdi-monitor-cellphone","界面设计、交互规范、设计系统",1,36,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"94626ba9-a123-4062-b1ae-0b8db0a9bc21","1.0.0","makepad-layout.zip",2229,"uploads\u002Fskills\u002F7c501225-124e-4f8a-b977-9b7df12f6742\u002Fmakepad-layout.zip","b112369607f2271b34eb9c663ed1f0b914aa9172c42aacb8053855570d979638","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":5064}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]