Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ainergiz avatar

Component Variants

  • 5 installs
  • 6 repo stars
  • Updated February 8, 2026
  • ainergiz/design-inspirations

component-variants is a Claude Code skill that creates matching light and dark mode variants of UI components using a consistent Tailwind color token mapping.

About

component-variants is a Claude Code skill that builds matching light and dark versions of a UI component using a fixed Tailwind color-token table. A developer uses it when creating theme-aware or dual-theme components so light and dark variants share identical structure. It maps backgrounds, text, borders, shadows, badges, and separators between the two modes.

  • Systematic light/dark color token mapping table for Tailwind
  • Paired ComponentLight/ComponentDark structure with a unified variant prop
  • Includes an accessibility and structure checklist

Component Variants by the numbers

  • 5 all-time installs (skills.sh)
  • Ranked #1,786 of 2,244 Frontend Development skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

component-variants capabilities & compatibility

Capabilities
dark mode tokens · component scaffolding · theme variants
Use cases
frontend · ui design
Pricing
Free
From the docs

What component-variants says it does

Creates light and dark mode component variants with consistent color token mapping.
SKILL.md
Create matching light and dark variants of UI components using a systematic color token approach.
SKILL.md
npx skills add https://github.com/ainergiz/design-inspirations --skill component-variants

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs5
repo stars6
Last updatedFebruary 8, 2026
Repositoryainergiz/design-inspirations

What it does

Building paired light and dark UI component variants with a consistent Tailwind color token mapping.

Who is it for?

Building dual-theme React components where light and dark variants must stay structurally identical.

Skip if: Runtime theme switching logic or non-Tailwind styling systems.

When should I use this skill?

When building light/dark UI pairs or implementing theme-aware designs.

What you get

Paired variants with an identical structure and a systematic color token mapping.

  • ComponentLight and ComponentDark variants
  • unified component accepting a variant prop

By the numbers

  • Color token mapping across 5 category tables
  • 5-item completion checklist

Files

SKILL.mdMarkdownGitHub ↗

Component Variants Pattern

Create matching light and dark variants of UI components using a systematic color token approach.

Pattern Overview

1. Create paired components: ComponentLight and ComponentDark 2. Mirror the structure exactly between variants 3. Map colors systematically using the token table below 4. Export a unified component that renders both or accepts a variant prop

Color Token Mapping

Basic Tokens

Semantic UseLight ModeDark Mode
Card backgroundbg-[#f8f8f8]bg-zinc-800
Card borderborder-zinc-200/80border-zinc-700/80
Content areabg-whitebg-zinc-900
Primary texttext-zinc-900text-zinc-100
Secondary texttext-zinc-600text-zinc-400
Muted texttext-zinc-500text-zinc-500
Icon colortext-zinc-400text-zinc-500
Tag backgroundbg-zinc-100bg-zinc-800 border border-zinc-700
Tag texttext-zinc-600text-zinc-400
Accent backgroundbg-green-50bg-green-900/50
Accent texttext-green-700text-green-400
Shadowshadow-zinc-200/50shadow-black/30
Hover backgroundhover:bg-zinc-100/50hover:bg-zinc-700/30

Gradient & Nested Card Tokens

Semantic UseLight ModeDark Mode
Outer card gradientbg-gradient-to-b from-[#e8e8ea] to-[#dcdce0]bg-gradient-to-b from-zinc-700 to-zinc-800
Outer card borderborder-white/60border-zinc-600/40
Outer card shadowshadow-xl shadow-zinc-400/30shadow-xl shadow-black/50
Inner media borderborder-white/40border-zinc-600/30

Badge Tokens

Semantic UseLight ModeDark Mode
Success badge bgbg-[#d4f5d4]bg-emerald-900/40
Success badge texttext-zinc-700text-emerald-400

Separator Tokens

Semantic UseLight ModeDark Mode
Dot separatortext-zinc-300text-zinc-600
Border separatorborder-zinc-300border-zinc-700

Implementation Template

// 1. Create the Light variant
function ComponentLight() {
  return (
    <div className="bg-[#f8f8f8] rounded-xl border border-zinc-200/80 shadow-lg shadow-zinc-200/50">
      <div className="bg-white px-4 py-4">
        <span className="text-zinc-900">Primary content</span>
        <span className="text-zinc-500">Secondary content</span>
      </div>
    </div>
  );
}

// 2. Create the Dark variant (mirror structure, swap tokens)
function ComponentDark() {
  return (
    <div className="bg-zinc-800 rounded-xl border border-zinc-700/80 shadow-lg shadow-black/30">
      <div className="bg-zinc-900 px-4 py-4">
        <span className="text-zinc-100">Primary content</span>
        <span className="text-zinc-500">Secondary content</span>
      </div>
    </div>
  );
}

// 3. Export unified component
export function Component({ variant = "light" }: { variant?: "light" | "dark" }) {
  return variant === "dark" ? <ComponentDark /> : <ComponentLight />;
}

Helper Components Pattern

When components have repeated sub-elements, create paired helpers:

interface InfoRowProps {
  icon: React.ReactNode;
  label: string;
  value: React.ReactNode;
}

function InfoRowLight({ icon, label, value }: InfoRowProps) {
  return (
    <div className="flex items-center gap-3 py-1">
      <span className="text-zinc-400">{icon}</span>
      <span className="text-zinc-500 text-sm w-32">{label}</span>
      <div className="flex-1">{value}</div>
    </div>
  );
}

function InfoRowDark({ icon, label, value }: InfoRowProps) {
  return (
    <div className="flex items-center gap-3 py-1">
      <span className="text-zinc-500">{icon}</span>
      <span className="text-zinc-500 text-sm w-32">{label}</span>
      <div className="flex-1">{value}</div>
    </div>
  );
}

Checklist

  • [ ] Light and dark variants have identical structure
  • [ ] All color classes mapped according to token table
  • [ ] Text contrast meets accessibility guidelines
  • [ ] Shadows appropriate for each theme
  • [ ] Hover/focus states defined for both themes

Related skills

FAQ

What does component-variants do?

It creates matching light and dark UI component variants using a consistent color token mapping table.

When should I use it?

When building dual-theme components or light/dark UI pairs that must share identical structure.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.