design-system-components
Patterns for building design system components using Surface primitives, CVA variants, and consistent styling. Use when building reusable UI components that follow design token architecture. Triggers on Surface component, CVA, class-variance-authority, component variants, design tokens.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/wpank/design-system-componentsDesign System Components
Build reusable components that leverage design tokens with Surface primitives and CVA (class-variance-authority).
When to Use
- Building component libraries with design tokens
- Need variant-based styling (size, color, state)
- Creating layered UI with consistent surfaces
- Want type-safe component APIs
Pattern 1: Surface Primitive
Single component for all layered surfaces:
import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '@/lib/utils';
const surfaceVariants = cva(
'rounded-lg backdrop-blur-sm transition-colors',
{
variants: {
layer: {
panel: 'bg-tone-cadet/40 border border-tone-jordy/10 shadow-card',
tile: 'bg-tone-midnight/60 border border-tone-jordy/5',
chip: 'bg-tone-cyan/10 border border-tone-cyan/20 rounded-full',
deep: 'bg-tone-void/80',
metric: 'bg-tone-cadet/20 border border-tone-jordy/8',
glass: 'bg-glass-bg backdrop-blur-lg border border-glass-border',
},
interactive: {
true: 'cursor-pointer hover:bg-tone-cadet/50 active:scale-[0.98]',
false: '',
},
glow: {
true: 'shadow-glow',
false: '',
},
},
defaultVariants: {
layer: 'tile',
interactive: false,
glow: false,
},
}
);
interface SurfaceProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof surfaceVariants> {}
export function Surface({
layer,
interactive,
glow,
className,
...props
}: SurfaceProps) {
return (
<div
className={cn(surfaceVariants({ layer, interactive, glow }), className)}
{...props}
/>
);
}
Usage
<Surface layer="panel" className="p-4">
<h2>Dashboard</h2>
</Surface>
<Surface layer="chip" interactive>
<span>Active</span>
</Surface>
<Surface layer="metric" glow>
<span className="text-2xl">$1,234.56</span>
</Surface>
Pattern 2: CVA Button Variants
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-wpank-design-system-components": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
mermaid-diagrams
Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.
api-design-principles
Skill by wpank
auto-context
Automatically read relevant context before major actions. Loads TODO.md, roadmap.md, handoffs, task plans, and other project context files so the AI operates with full situational awareness. Use when starting a task, implementing a feature, refactoring, debugging, planning, or resuming a session.
clear-writing
Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.
track-performance
Track the performance of Uniswap LP positions over time — check which positions need attention, are out of range, or have uncollected fees. Use when the user asks how their positions are doing.