Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计提醒

makepad-widgets制作板小部件

Agent Skill

makepad-widgets 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

475

周安装

20

GitHub Stars

737

下载量

166
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:makepad-widgets(制作板小部件)
来源仓库:https://github.com/zhanghandong/makepad-skills
仓库路径:skills/makepad-widgets
安装命令:
npx skills add https://github.com/zhanghandong/makepad-skills --skill makepad-widgets
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/zhanghandong/makepad-skills --skill makepad-widgets

简介

makepad-widgets 用于查找、检索和筛选相关信息。

  • 适合根据关键词、任务场景或来源线索快速定位候选结果时使用。
  • 可结合来源仓库和原始 README 核验具体用法,但需注意权限和维护状态。
  • 安装命令为 npx skills add https://github.com/zhanghandong/makepad-skills --skill makepad-widgets。
  • 建议确认是否会触发联网、命令执行或文件读写操作。

SKILL.md

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:

  1. Read the relevant reference file(s) listed above
  2. 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

  1. 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/)

CategoryWidgets
BasicView, Label, Button, Icon, Image
InputTextInput, CheckBox, RadioButton, Slider, DropDown, ColorPicker
ContainerScrollBars, PortalList, FlatList, StackNavigation, Dock, Splitter
NavigationTabBar, Tab, FoldHeader, FoldButton, ExpandablePanel
OverlayModal, Tooltip, PopupMenu, PopupNotification
MediaVideo, RotatedImage, ImageBlend, MultiImage
LayoutAdaptiveView, SlidePanel, PageFlip, SlidesView
SpecialMarkdown, Html, TextFlow, WebView, KeyboardView
UtilityLoadingSpinner, DesktopButton, LinkLabel, ScrollShadow

Core Widgets Reference

WidgetPurposeKey Properties
ViewContainerflow, align, show_bg, draw_bg, optimize
ButtonClickabletext, draw_bg, draw_text, draw_icon
LabelText displaytext, draw_text
ImageImage displaysource, fit
TextInputText entrytext, draw_text, draw_cursor, draw_selection
CheckBoxToggletext, selected
RadioButtonSelectiontext, selected
SliderValue slidermin, max, step
DropDownSelect menulabels, selected
PortalListVirtual listEfficient scrolling for large lists
ModalDialogOverlay dialog boxes
TooltipHintHover tooltips

View Variants

VariantDescription
SolidViewSolid background color
RoundedViewRounded corners
RoundedAllViewIndividual corner control
RectViewRectangle with border/gradient
CircleViewCircle/ellipse shape
GradientXViewHorizontal gradient
GradientYViewVertical gradient
RoundedShadowViewRounded with shadow
ScrollXViewHorizontal scroll
ScrollYViewVertical scroll
ScrollXYViewBoth directions scroll
CachedViewTexture-cached

Button Variants

VariantDescription
ButtonFlatFlat style
ButtonFlatIconFlat with icon
ButtonFlatterNo background
ButtonGradientXHorizontal gradient
ButtonGradientYVertical gradient
ButtonIconStandard with icon

ImageFit Values

ValueDescription
StretchStretch to fill
ContainFit within, preserve ratio
CoverCover area, may crop
FillFill without ratio

When Writing Code

  1. Always set width and height on widgets
  2. Use show_bg: true to enable background rendering
  3. Access draw_bg, draw_text, draw_icon for shader uniforms
  4. Use dep("crate://self/...") for resource paths
  5. Choose appropriate View variant for visual needs

When Answering Questions

  1. Recommend UI Zoo example for widget exploration
  2. View is the base container - most visual widgets inherit from it
  3. Draw shaders (draw_bg, draw_text) control appearance
  4. All widgets support animation through animator property

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Antigravity

26.02%
按下载量换算43

Codex

24.98%
按下载量换算41

Gemini CLI

15.28%
按下载量换算25

OpenCode

13.62%
按下载量换算23

windsurf

7.2%
按下载量换算12

Claude Code

3.75%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills