kjuhwa/skills-hub/antd-wrapper-component-pattern

Claude Code and agent skill by kjuhwa/skills-hub

Trust tier 3
  • community
Source check pending

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-pattern

SKILL.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

  1. 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} />; }; ```

  1. Re-export from design system barrel:
  • export { Card } from './data-display/card/Card'
  • Consumers import from @design-system instead of antd directly
  1. Apply to all wrapped components (Card, Collapse, Tabs, Button, Modal, Drawer, etc.):
  • Each wrapper: extend props interface, add classNames logic, pass through rest
  • Maintain same prop API — consumers can still use any Ant prop
  1. Handle compound components:
  • For Tabs.TabPane, Collapse.Panel: re-export sub-components or compose
  • Attach as static properties: Card.Meta = AntCard.Meta
  1. 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kjuhwa/skills-hub/antd-wrapper-component-pattern/badge)](https://verified-skill.com/skills/kjuhwa/skills-hub/antd-wrapper-component-pattern)

Something wrong with this skill or its page? Tell us.