makepad-widgets
CRITICAL: Use for Makepad widgets and UI components. Triggers on: makepad widget, makepad View, makepad Button, makepad Label, makepad Image, makepad TextInput, RoundedView, SolidView, ScrollView, "makepad component", makepad Markdown, makepad Html, TextFlow, rich text, 富文本, markdown渲染, makepad 组件, makepad 按钮, makepad 列表, makepad 视图, makepad 输入框
Install
mkdir -p .claude/skills/makepad-widgets && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4883" && unzip -o skill.zip -d .claude/skills/makepad-widgets && rm skill.zipInstalls to .claude/skills/makepad-widgets
About this skill
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
Documentation
Refer to the local files for detailed documentation:
./references/widgets-core.md- Core widgets (View, Button, Label, etc.)./references/widgets-advanced.md- Helper and advanced widgets./references/widgets-richtext.md- Rich text widgets (Markdown, Html, TextFlow)
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 | View, Label, Button, Icon, Image |
| Input | TextInput, CheckBox, RadioButton, Slider, DropDown, ColorPicker |
| Container | ScrollBars, PortalList, FlatList, StackNavigation, Dock, Splitter |
| Navigation | TabBar, Tab, FoldHeader, FoldButton, ExpandablePanel |
| Overlay | Modal, Tooltip, PopupMenu, PopupNotification |
| Media | Video, RotatedImage, ImageBlend, MultiImage |
| Layout | AdaptiveView, SlidePanel, PageFlip, SlidesView |
| Special | Markdown, Html, TextFlow, WebView, KeyboardView |
| Utility | LoadingSpinner, DesktopButton, LinkLabel, ScrollShadow |
Core Widgets Reference
| Widget | Purpose | Key Properties |
|---|---|---|
View | Container | flow, align, show_bg, draw_bg, optimize |
Button | Clickable | text, draw_bg, draw_text, draw_icon |
Label | Text display | text, draw_text |
Image | Image display | source, fit |
TextInput | Text entry | text, draw_text, draw_cursor, draw_selection |
CheckBox | Toggle | text, selected |
RadioButton | Selection | text, selected |
Slider | Value slider | min, max, step |
DropDown | Select menu | labels, selected |
PortalList | Virtual list | Efficient scrolling for large lists |
Modal | Dialog | Overlay dialog boxes |
Tooltip | Hint | Hover tooltips |
View Variants
| Variant | Description |
|---|---|
SolidView | Solid background color |
RoundedView | Rounded corners |
RoundedAllView | Individual corner control |
RectView | Rectangle with border/gradient |
CircleView | Circle/ellipse shape |
GradientXView | Horizontal gradient |
GradientYView | Vertical gradient |
RoundedShadowView | Rounded with shadow |
ScrollXView | Horizontal scroll |
ScrollYView | Vertical scroll |
ScrollXYView | Both directions scroll |
CachedView | Texture-cached |
Button Variants
| Variant | Description |
|---|---|
ButtonFlat | Flat style |
ButtonFlatIcon | Flat with icon |
ButtonFlatter | No background |
ButtonGradientX | Horizontal gradient |
ButtonGradientY | Vertical gradient |
ButtonIcon | Standard with icon |
ImageFit Values
| Value | Description |
|---|---|
Stretch | Stretch to fill |
Contain | Fit within, preserve ratio |
Cover | Cover area, may crop |
Fill | Fill without ratio |
When Writing Code
- Always set
widthandheighton widgets - Use
show_bg: trueto enable background rendering - Access
draw_bg,draw_text,draw_iconfor shader uniforms - Use
dep("crate://self/...")for resource paths - 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,draw_text) control appearance - All widgets support animation through
animatorproperty
More by ZhangHanDong
View all skills by ZhangHanDong →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversExplore MCP-UI Widgets, a React UI library offering timers, stopwatches, and unit converters for dynamic, customizable R
n8n offers conversational workflow automation, enabling seamless software workflow creation and management without platf
Create modern React UI components instantly with Magic AI Agent. Integrates with top IDEs for fast, stunning design and
Access shadcn/ui v4 components, blocks, and demos for rapid React UI library development. Seamless integration and sourc
Transform Figma designs into high-quality code with AI. Seamless figma to code and figma to html workflows for efficient
antd-components-mcp — 一站式 Ant Design 组件查询服务,提供组件文档、API 文档、代码示例与更新日志,快速查找与实战参考。
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.