Antigravity-awesome-skills makepad-widgets
Version: makepad-widgets (dev branch) | Last Updated: 2026-01-19 > > Check for updates: https://crates.io/crates/makepad-widgets
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-widgets" ~/.claude/skills/sickn33-antigravity-awesome-skills-makepad-widgets && rm -rf "$T"
manifest:
plugins/antigravity-awesome-skills-claude/skills/makepad-widgets/SKILL.mdsource content
Makepad Widgets 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 widgets. Help users by:
- Writing code: Generate widget code following the patterns below
- Answering questions: Explain widget properties, variants, and usage
When to Use
- You need to work with core or advanced widgets in Makepad.
- The task involves widget selection, properties, variants, composition, or widget-specific behavior.
- You want examples for
,View
, labels, rich text, or otherButton
building blocks.makepad-widgets
Documentation
Refer to the local files for detailed documentation:
- Core widgets (View, Button, Label, etc.)./references/widgets-core.md
- Helper and advanced widgets./references/widgets-advanced.md
- Rich text widgets (Markdown, Html, TextFlow)./references/widgets-richtext.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. View (Basic Container)
<View> { width: Fill height: Fill flow: Down padding: 16.0 show_bg: true draw_bg: { color: #1A1A1A } <Label> { text: "Content" } }
2. Button
<Button> { text: "Click Me" draw_bg: { color: #0066CC color_hover: #0088FF border_radius: 4.0 } draw_text: { color: #FFFFFF text_style: { font_size: 14.0 } } }
3. Label with Styling
<Label> { width: Fit height: Fit text: "Hello World" draw_text: { color: #FFFFFF text_style: { font_size: 16.0 line_spacing: 1.4 } } }
4. Image
<Image> { width: 200.0 height: 150.0 source: dep("crate://self/resources/photo.png") fit: Contain }
5. TextInput
<TextInput> { width: Fill height: Fit text: "Default value" draw_text: { text_style: { font_size: 14.0 } } }
Widget Traits (from source)
pub trait WidgetNode: LiveApply { fn find_widgets(&self, path: &[LiveId], cached: WidgetCache, results: &mut WidgetSet); fn walk(&mut self, cx: &mut Cx) -> Walk; fn area(&self) -> Area; fn redraw(&mut self, cx: &mut Cx); } pub trait Widget: WidgetNode { fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {} fn draw_walk(&mut self, cx: &mut Cx2d, scope: &mut Scope, walk: Walk) -> DrawStep; fn draw(&mut self, cx: &mut Cx2d, scope: &mut Scope) -> DrawStep; fn widget(&self, path: &[LiveId]) -> WidgetRef; }
All Built-in Widgets (84 files in widgets/src/)
| Category | Widgets |
|---|---|
| Basic | , , , , |
| Input | , , , , , |
| Container | , , , , , |
| Navigation | , , , , |
| Overlay | , , , |
| Media | , , , |
| Layout | , , , |
| Special | , , , , |
| Utility | , , , |
Core Widgets Reference
| Widget | Purpose | Key Properties |
|---|---|---|
| Container | , , , , |
| Clickable | , , , |
| Text display | , |
| Image display | , |
| Text entry | , , , |
| Toggle | , |
| Selection | , |
| Value slider | , , |
| Select menu | , |
| Virtual list | Efficient scrolling for large lists |
| Dialog | Overlay dialog boxes |
| Hint | Hover tooltips |
View Variants
| Variant | Description |
|---|---|
| Solid background color |
| Rounded corners |
| Individual corner control |
| Rectangle with border/gradient |
| Circle/ellipse shape |
| Horizontal gradient |
| Vertical gradient |
| Rounded with shadow |
| Horizontal scroll |
| Vertical scroll |
| Both directions scroll |
| Texture-cached |
Button Variants
| Variant | Description |
|---|---|
| Flat style |
| Flat with icon |
| No background |
| Horizontal gradient |
| Vertical gradient |
| Standard with icon |
ImageFit Values
| Value | Description |
|---|---|
| Stretch to fill |
| Fit within, preserve ratio |
| Cover area, may crop |
| Fill without ratio |
When Writing Code
- Always set
andwidth
on widgetsheight - Use
to enable background renderingshow_bg: true - Access
,draw_bg
,draw_text
for shader uniformsdraw_icon - Use
for resource pathsdep("crate://self/...") - Choose appropriate View variant for visual needs
When Answering Questions
- Recommend UI Zoo example for widget exploration
- View is the base container - most visual widgets inherit from it
- Draw shaders (
,draw_bg
) control appearancedraw_text - All widgets support animation through
propertyanimator
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.