kjuhwa/skills-hub/antd-wrapper-component-pattern
Claude Code and agent skill by kjuhwa/skills-hub
- community
Checking that the SKILL.md file is still in the repository.
Wrap Ant Design components with a custom design system layer (Sirius pattern) that extends props, enforces standards, and maintains upgrade compatibility
Install
npx vskill@latest install kjuhwa/skills-hub/antd-wrapper-component-patternSKILL.md
The same SKILL.md was published earlier as kjuhwa/skills-hub/antd-wrapper-component-pattern.
Ant Design Wrapper Component Pattern
Context
Instead of replacing Ant Design, wrap each component with a thin layer that adds custom props (standardLayout, padding, size), enforces design tokens, and passes through all original Ant props via ...rest.
Steps
- Create wrapper component matching Ant's export name:
```tsx // Card.tsx (Sirius) import { Card as AntCard, CardProps as AntCardProps } from 'antd';
interface SiriusCardProps extends AntCardProps { standardLayout?: boolean; padding?: 'none' | 'sm' | 'md' | 'lg'; }
export const Card = ({ standardLayout, padding, className, ...rest }: SiriusCardProps) => { const mergedClassName = classNames(className, { 'sirius-card-standard': standardLayout, [sirius-card-padding-${padding}]: padding, }); return <AntCard className={mergedClassName} {...rest} />; }; ```
- Re-export from design system barrel:
export { Card } from './data-display/card/Card'- Consumers import from
@design-systeminstead ofantddirectly
- Apply to all wrapped components (Card, Collapse, Tabs, Button, Modal, Drawer, etc.):
- Each wrapper: extend props interface, add
classNameslogic, pass through rest - Maintain same prop API — consumers can still use any Ant prop
- Handle compound components:
- For
Tabs.TabPane,Collapse.Panel: re-export sub-components or compose - Attach as static properties:
Card.Meta = AntCard.Meta
- StyleProvider integration:
- Wrap app root with Ant's
StyleProvider(hashPriority="high") for CSS-in-JS priority
Benefits
- Ant Design upgrades only require updating the wrapper layer
- Design token enforcement at the wrapper level (className injection)
- Consumers get typed custom props + full Ant prop passthrough
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/design/antd-wrapper-component-pattern/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kjuhwa/skills-hub/antd-wrapper-component-pattern)