Community编程与开发github.com

mantinedev/mantine-custom-components

构建与 Mantine 主题、样式 API 及核心功能集成的自定义组件。在以下场景使用此技能:(1) 使用 factory()、polymorphicFactory() 或 genericFactory() 创建新组件;(2) 添加样式 API 支持(classNames、styles、vars、unstyled);(3) 通过 createVarsResolver 实现 CSS 变量;(4) 构建包含子组件和共享上下文的复合组件;(5) 通过 Component.extend() 向 MantineProvider 注册组件;(6) 任何涉及 @mantine/core 中 Factory、useProps、useStyles、BoxProps、StylesApiProps 或 ElementProps 的任务。

mantine-custom-components 是什么?

此技能旨在指导开发者构建与 Mantine v7 主题系统、样式 API 及核心功能紧密集成的自定义组件。它详细说明如何利用 factory()、polymorphicFactory() 或 genericFactory() 创建组件,并为其添加样式 API 支持(包括 classNames、styles、vars 和 unstyled 属性)。此外,还涵盖通过 createVarsResolver 实现 CSS 变量、构建包含子组件和共享上下文的复合组件,以及通过 Component.extend() 向 MantineProvider 注册组件的完整流程。该技能适用于所有需要将自定义组件深度融入 Mantine 生态的开发者,支持在 React 项目中使用 @mantine/core 库。通过遵循其指导,开发者能确保自定义组件在样式、主题和上下文方面与 Mantine 现有组件行为一致。

兼容平台~Claude Code~Codex CLI~Cursor
Part ofReact
npx skills add https://github.com/mantinedev/skills/tree/main/skills/mantine-custom-components

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

mantine-custom-components 是做什么的?

构建与 Mantine 主题、样式 API 及核心功能集成的自定义组件。在以下场景使用此技能:(1) 使用 factory()、polymorphicFactory() 或 genericFactory() 创建新组件;(2) 添加样式 API 支持(classNames、styles、vars、unstyled);(3) 通过 createVarsResolver 实现 CSS 变量;(4) 构建包含子组件和共享上下文的复合组件;(5) 通过 Component.extend() 向 MantineProvider 注册组件;(6) 任何涉及 @mantine/core 中 Factory、useProps、useStyles、BoxProps、StylesApiProps 或 ElementProps 的任务。

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

相关技能