Agent skill Frontend
Mantine Custom Components
Build or refine reusable components for a web interface.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add mantinedev/skills --skill mantine-custom-components --agent claude-code --yesCheck this file in your project.claude/skills/mantine-custom-components/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add mantinedev/skills --skill mantine-custom-componentsSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use React 19 with Mantine 9.x and the existing `MantineProvider` and CSS entry. The fixture used matching `@mantine/core` and `@mantine/hooks` 9.8.3.
View operation manualWhat this skill helps with
- Build or refine reusable components for a web interface.
Good for
- Component implementation
- Skill name
- mantine-custom-components
- Scenario
- Create a theme-aware notice component
- Deliverable
- A typed Notice with a radius variable, theme defaults, and a caller-overridable inner slot.
- Skill name
mantine-custom-components- Repository
mantinedev/skills
Define a component task with an observable result
A request with an unclear outcome
Add a second theme setting and style every notice at its call site.
Scattered overrides make provider defaults hard to apply and make visual drift harder to see.
A workflow with observable results
- Define the component contract
- Wire theme defaults and overrides
- Check style precedence in a preview
Mantine custom components operation manual
Expose just enough Styles API for callers to style the outer notice and its content consistently.
Replace the bracketed details with your own project and target.
Define the component contract
Identify stable Styles API selectors.
Prompt · Step 1Use the `mantine-custom-components` skill to inspect [notice component] and the project Mantine theme. Confirm the installed major and core CSS import. Propose a fixed div root using `factory`, `Box`, and `root` plus `inner` Styles API selectors. List the existing behavior and CSS class consumers before implementing.Wire theme defaults and overrides
Use a CSS variable with a theme fallback.
Prompt · Step 2Use `mantine-custom-components` to implement [notice component]. Call `useProps` before destructuring and apply `useStyles` to each actual slot. Resolve the radius with `createVarsResolver` and `getRadius`, with a CSS fallback to the theme radius. Register one `Notice.extend` provider default and keep the call-site `radius` and `classNames.inner` overrides supported.Check style precedence in a preview
Compare default and local instances side by side.
- Component props override the theme default on the local instance.
- Each exposed Styles API selector styles its matching element.
Prompt · Step 3Use `mantine-custom-components` to validate [local preview]. Render one Notice with only provider defaults and one with an explicit smaller `radius` and `classNames.inner`. Run the project typecheck and compare computed border radii. Verify the inner class attaches to the content element and show the component and theme paths.
Find the relevant rule
Point the assistant to the installed Skill and a specific issue.
Check how the theme override is registeredReference
- Command or reference
SKILL.md · Theme integration- Examples
- Match the provider key to the name passed to `useProps` and `useStyles`.
Mantine custom components troubleshooting
When should I choose polymorphicFactory?
Use it if callers need to change the root via `component` or `renderRoot`. A fixed div-backed Notice can use `factory`.