{
  "schemaVersion": "1.0",
  "item": {
    "slug": "design-system-components",
    "name": "Design System Components",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/wpank/design-system-components",
    "canonicalUrl": "https://clawhub.ai/wpank/design-system-components",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/design-system-components",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=design-system-components",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/design-system-components"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/design-system-components",
    "agentPageUrl": "https://openagent3.xyz/skills/design-system-components/agent",
    "manifestUrl": "https://openagent3.xyz/skills/design-system-components/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/design-system-components/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Design System Components",
        "body": "Build reusable components that leverage design tokens with Surface primitives and CVA (class-variance-authority)."
      },
      {
        "title": "When to Use",
        "body": "Building component libraries with design tokens\nNeed variant-based styling (size, color, state)\nCreating layered UI with consistent surfaces\nWant type-safe component APIs"
      },
      {
        "title": "Pattern 1: Surface Primitive",
        "body": "Single component for all layered surfaces:\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\n\nconst surfaceVariants = cva(\n  'rounded-lg backdrop-blur-sm transition-colors',\n  {\n    variants: {\n      layer: {\n        panel: 'bg-tone-cadet/40 border border-tone-jordy/10 shadow-card',\n        tile: 'bg-tone-midnight/60 border border-tone-jordy/5',\n        chip: 'bg-tone-cyan/10 border border-tone-cyan/20 rounded-full',\n        deep: 'bg-tone-void/80',\n        metric: 'bg-tone-cadet/20 border border-tone-jordy/8',\n        glass: 'bg-glass-bg backdrop-blur-lg border border-glass-border',\n      },\n      interactive: {\n        true: 'cursor-pointer hover:bg-tone-cadet/50 active:scale-[0.98]',\n        false: '',\n      },\n      glow: {\n        true: 'shadow-glow',\n        false: '',\n      },\n    },\n    defaultVariants: {\n      layer: 'tile',\n      interactive: false,\n      glow: false,\n    },\n  }\n);\n\ninterface SurfaceProps\n  extends React.HTMLAttributes<HTMLDivElement>,\n    VariantProps<typeof surfaceVariants> {}\n\nexport function Surface({\n  layer,\n  interactive,\n  glow,\n  className,\n  ...props\n}: SurfaceProps) {\n  return (\n    <div\n      className={cn(surfaceVariants({ layer, interactive, glow }), className)}\n      {...props}\n    />\n  );\n}"
      },
      {
        "title": "Usage",
        "body": "<Surface layer=\"panel\" className=\"p-4\">\n  <h2>Dashboard</h2>\n</Surface>\n\n<Surface layer=\"chip\" interactive>\n  <span>Active</span>\n</Surface>\n\n<Surface layer=\"metric\" glow>\n  <span className=\"text-2xl\">$1,234.56</span>\n</Surface>"
      },
      {
        "title": "Pattern 2: CVA Button Variants",
        "body": "const buttonVariants = cva(\n  'inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50',\n  {\n    variants: {\n      variant: {\n        default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n        destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n        outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n        ghost: 'hover:bg-accent hover:text-accent-foreground',\n        link: 'text-primary underline-offset-4 hover:underline',\n        cyber: 'bg-gradient-to-r from-tone-cadet to-tone-azure text-white border border-tone-cyan/30 shadow-glow hover:shadow-glow-lg',\n      },\n      size: {\n        default: 'h-10 px-4 py-2',\n        sm: 'h-9 rounded-md px-3',\n        lg: 'h-11 rounded-md px-8',\n        icon: 'h-10 w-10',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  }\n);"
      },
      {
        "title": "Pattern 3: Metric Display Component",
        "body": "const metricVariants = cva(\n  'font-mono tabular-nums',\n  {\n    variants: {\n      size: {\n        lg: 'text-3xl font-bold tracking-tight',\n        md: 'text-xl font-semibold',\n        sm: 'text-base font-medium',\n      },\n      trend: {\n        positive: 'text-success',\n        negative: 'text-destructive',\n        neutral: 'text-foreground',\n      },\n    },\n    defaultVariants: {\n      size: 'md',\n      trend: 'neutral',\n    },\n  }\n);\n\ninterface MetricProps extends VariantProps<typeof metricVariants> {\n  value: string | number;\n  label?: string;\n  prefix?: string;\n  suffix?: string;\n}\n\nexport function Metric({\n  value,\n  label,\n  prefix = '',\n  suffix = '',\n  size,\n  trend,\n}: MetricProps) {\n  return (\n    <div className=\"flex flex-col\">\n      {label && (\n        <span className=\"text-xs uppercase tracking-wider text-muted-foreground mb-1\">\n          {label}\n        </span>\n      )}\n      <span className={cn(metricVariants({ size, trend }))}>\n        {prefix}{value}{suffix}\n      </span>\n    </div>\n  );\n}"
      },
      {
        "title": "Pattern 4: Card with Header",
        "body": "interface CardProps {\n  title?: string;\n  description?: string;\n  action?: React.ReactNode;\n  children: React.ReactNode;\n}\n\nexport function Card({ title, description, action, children }: CardProps) {\n  return (\n    <Surface layer=\"panel\" className=\"flex flex-col\">\n      {(title || action) && (\n        <div className=\"flex items-center justify-between px-4 py-3 border-b border-tone-jordy/10\">\n          <div>\n            {title && (\n              <h3 className=\"font-display text-sm font-medium\">{title}</h3>\n            )}\n            {description && (\n              <p className=\"text-xs text-muted-foreground\">{description}</p>\n            )}\n          </div>\n          {action}\n        </div>\n      )}\n      <div className=\"p-4\">{children}</div>\n    </Surface>\n  );\n}"
      },
      {
        "title": "Pattern 5: Badge/Chip Variants",
        "body": "const badgeVariants = cva(\n  'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors',\n  {\n    variants: {\n      variant: {\n        default: 'bg-primary/10 text-primary border border-primary/20',\n        success: 'bg-success/10 text-success border border-success/20',\n        warning: 'bg-warning/10 text-warning border border-warning/20',\n        destructive: 'bg-destructive/10 text-destructive border border-destructive/20',\n        outline: 'border border-input text-foreground',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n    },\n  }\n);"
      },
      {
        "title": "Pattern 6: Composing Variants",
        "body": "Combine CVA with conditional classes:\n\nfunction StatusIndicator({ \n  status, \n  size = 'md' \n}: { \n  status: 'online' | 'offline' | 'away';\n  size?: 'sm' | 'md' | 'lg';\n}) {\n  const sizeClasses = {\n    sm: 'size-2',\n    md: 'size-3',\n    lg: 'size-4',\n  };\n\n  const statusClasses = {\n    online: 'bg-success animate-pulse',\n    offline: 'bg-muted-foreground',\n    away: 'bg-warning',\n  };\n\n  return (\n    <span\n      className={cn(\n        'rounded-full',\n        sizeClasses[size],\n        statusClasses[status]\n      )}\n    />\n  );\n}"
      },
      {
        "title": "Related Skills",
        "body": "Meta-skill: ai/skills/meta/design-system-creation/ — Complete design system workflow\ndistinctive-design-systems — Token architecture and aesthetic foundations\nloading-state-patterns — Skeleton components for loading states"
      },
      {
        "title": "NEVER Do",
        "body": "Build custom card containers — Use Surface primitive\nHardcode colors in components — Use design tokens\nSkip variant types — CVA provides type safety\nMix styling approaches — Pick CVA or cn(), not random inline styles\nForget default variants — Components should work without props"
      },
      {
        "title": "Quick Reference",
        "body": "// 1. Define variants with CVA\nconst variants = cva('base-classes', {\n  variants: {\n    size: { sm: '...', md: '...', lg: '...' },\n    color: { primary: '...', secondary: '...' },\n  },\n  defaultVariants: { size: 'md', color: 'primary' },\n});\n\n// 2. Type props from variants\ninterface Props extends VariantProps<typeof variants> {}\n\n// 3. Apply in component\n<div className={cn(variants({ size, color }), className)} />"
      }
    ],
    "body": "Design System Components\n\nBuild reusable components that leverage design tokens with Surface primitives and CVA (class-variance-authority).\n\nWhen to Use\nBuilding component libraries with design tokens\nNeed variant-based styling (size, color, state)\nCreating layered UI with consistent surfaces\nWant type-safe component APIs\nPattern 1: Surface Primitive\n\nSingle component for all layered surfaces:\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\n\nconst surfaceVariants = cva(\n  'rounded-lg backdrop-blur-sm transition-colors',\n  {\n    variants: {\n      layer: {\n        panel: 'bg-tone-cadet/40 border border-tone-jordy/10 shadow-card',\n        tile: 'bg-tone-midnight/60 border border-tone-jordy/5',\n        chip: 'bg-tone-cyan/10 border border-tone-cyan/20 rounded-full',\n        deep: 'bg-tone-void/80',\n        metric: 'bg-tone-cadet/20 border border-tone-jordy/8',\n        glass: 'bg-glass-bg backdrop-blur-lg border border-glass-border',\n      },\n      interactive: {\n        true: 'cursor-pointer hover:bg-tone-cadet/50 active:scale-[0.98]',\n        false: '',\n      },\n      glow: {\n        true: 'shadow-glow',\n        false: '',\n      },\n    },\n    defaultVariants: {\n      layer: 'tile',\n      interactive: false,\n      glow: false,\n    },\n  }\n);\n\ninterface SurfaceProps\n  extends React.HTMLAttributes<HTMLDivElement>,\n    VariantProps<typeof surfaceVariants> {}\n\nexport function Surface({\n  layer,\n  interactive,\n  glow,\n  className,\n  ...props\n}: SurfaceProps) {\n  return (\n    <div\n      className={cn(surfaceVariants({ layer, interactive, glow }), className)}\n      {...props}\n    />\n  );\n}\n\nUsage\n<Surface layer=\"panel\" className=\"p-4\">\n  <h2>Dashboard</h2>\n</Surface>\n\n<Surface layer=\"chip\" interactive>\n  <span>Active</span>\n</Surface>\n\n<Surface layer=\"metric\" glow>\n  <span className=\"text-2xl\">$1,234.56</span>\n</Surface>\n\nPattern 2: CVA Button Variants\nconst buttonVariants = cva(\n  'inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50',\n  {\n    variants: {\n      variant: {\n        default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n        destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n        outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n        ghost: 'hover:bg-accent hover:text-accent-foreground',\n        link: 'text-primary underline-offset-4 hover:underline',\n        cyber: 'bg-gradient-to-r from-tone-cadet to-tone-azure text-white border border-tone-cyan/30 shadow-glow hover:shadow-glow-lg',\n      },\n      size: {\n        default: 'h-10 px-4 py-2',\n        sm: 'h-9 rounded-md px-3',\n        lg: 'h-11 rounded-md px-8',\n        icon: 'h-10 w-10',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  }\n);\n\nPattern 3: Metric Display Component\nconst metricVariants = cva(\n  'font-mono tabular-nums',\n  {\n    variants: {\n      size: {\n        lg: 'text-3xl font-bold tracking-tight',\n        md: 'text-xl font-semibold',\n        sm: 'text-base font-medium',\n      },\n      trend: {\n        positive: 'text-success',\n        negative: 'text-destructive',\n        neutral: 'text-foreground',\n      },\n    },\n    defaultVariants: {\n      size: 'md',\n      trend: 'neutral',\n    },\n  }\n);\n\ninterface MetricProps extends VariantProps<typeof metricVariants> {\n  value: string | number;\n  label?: string;\n  prefix?: string;\n  suffix?: string;\n}\n\nexport function Metric({\n  value,\n  label,\n  prefix = '',\n  suffix = '',\n  size,\n  trend,\n}: MetricProps) {\n  return (\n    <div className=\"flex flex-col\">\n      {label && (\n        <span className=\"text-xs uppercase tracking-wider text-muted-foreground mb-1\">\n          {label}\n        </span>\n      )}\n      <span className={cn(metricVariants({ size, trend }))}>\n        {prefix}{value}{suffix}\n      </span>\n    </div>\n  );\n}\n\nPattern 4: Card with Header\ninterface CardProps {\n  title?: string;\n  description?: string;\n  action?: React.ReactNode;\n  children: React.ReactNode;\n}\n\nexport function Card({ title, description, action, children }: CardProps) {\n  return (\n    <Surface layer=\"panel\" className=\"flex flex-col\">\n      {(title || action) && (\n        <div className=\"flex items-center justify-between px-4 py-3 border-b border-tone-jordy/10\">\n          <div>\n            {title && (\n              <h3 className=\"font-display text-sm font-medium\">{title}</h3>\n            )}\n            {description && (\n              <p className=\"text-xs text-muted-foreground\">{description}</p>\n            )}\n          </div>\n          {action}\n        </div>\n      )}\n      <div className=\"p-4\">{children}</div>\n    </Surface>\n  );\n}\n\nPattern 5: Badge/Chip Variants\nconst badgeVariants = cva(\n  'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors',\n  {\n    variants: {\n      variant: {\n        default: 'bg-primary/10 text-primary border border-primary/20',\n        success: 'bg-success/10 text-success border border-success/20',\n        warning: 'bg-warning/10 text-warning border border-warning/20',\n        destructive: 'bg-destructive/10 text-destructive border border-destructive/20',\n        outline: 'border border-input text-foreground',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n    },\n  }\n);\n\nPattern 6: Composing Variants\n\nCombine CVA with conditional classes:\n\nfunction StatusIndicator({ \n  status, \n  size = 'md' \n}: { \n  status: 'online' | 'offline' | 'away';\n  size?: 'sm' | 'md' | 'lg';\n}) {\n  const sizeClasses = {\n    sm: 'size-2',\n    md: 'size-3',\n    lg: 'size-4',\n  };\n\n  const statusClasses = {\n    online: 'bg-success animate-pulse',\n    offline: 'bg-muted-foreground',\n    away: 'bg-warning',\n  };\n\n  return (\n    <span\n      className={cn(\n        'rounded-full',\n        sizeClasses[size],\n        statusClasses[status]\n      )}\n    />\n  );\n}\n\nRelated Skills\nMeta-skill: ai/skills/meta/design-system-creation/ — Complete design system workflow\ndistinctive-design-systems — Token architecture and aesthetic foundations\nloading-state-patterns — Skeleton components for loading states\nNEVER Do\nBuild custom card containers — Use Surface primitive\nHardcode colors in components — Use design tokens\nSkip variant types — CVA provides type safety\nMix styling approaches — Pick CVA or cn(), not random inline styles\nForget default variants — Components should work without props\nQuick Reference\n// 1. Define variants with CVA\nconst variants = cva('base-classes', {\n  variants: {\n    size: { sm: '...', md: '...', lg: '...' },\n    color: { primary: '...', secondary: '...' },\n  },\n  defaultVariants: { size: 'md', color: 'primary' },\n});\n\n// 2. Type props from variants\ninterface Props extends VariantProps<typeof variants> {}\n\n// 3. Apply in component\n<div className={cn(variants({ size, color }), className)} />"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/wpank/design-system-components",
    "publisherUrl": "https://clawhub.ai/wpank/design-system-components",
    "owner": "wpank",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/design-system-components",
    "downloadUrl": "https://openagent3.xyz/downloads/design-system-components",
    "agentUrl": "https://openagent3.xyz/skills/design-system-components/agent",
    "manifestUrl": "https://openagent3.xyz/skills/design-system-components/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/design-system-components/agent.md"
  }
}