LO

logo-with-variants

Converts SVG assets into standardized, variant-based React components following the Clerk pattern.

Install

mkdir -p .claude/skills/logo-with-variants && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7038" && unzip -o skill.zip -d .claude/skills/logo-with-variants && rm skill.zip

Installs to .claude/skills/logo-with-variants

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Create logo components with multiple variants (icon, wordmark, logo) and light/dark modes. Use when the user provides logo SVG files and wants to create a variant-based logo component following the Clerk pattern in the Elements project.
236 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Identify variant types from SVG files
  • Detect light/dark mode versions of SVGs
  • Extract viewBox, colors, and dimensions from SVGs
  • Convert SVG attributes to JSX format
  • Create a component file with conditional rendering for variants and modes
  • Generate registry structure for logo components

How it works

The skill analyzes provided SVG files to identify variants and modes, extracts SVG attributes, converts SVG content to JSX, and generates a React component with conditional rendering and a registry structure.

Inputs & outputs

You give it
Multiple SVG files for a logo (icon, wordmark, logo variants) and paths to logo files
You get back
A React component file, registry structure, and updated registry files for a variant-based logo

When to use logo-with-variants

  • Adding new brand assets to UI library
  • Standardizing logo component architecture
  • Implementing theme-aware SVG components

About this skill

Logo with Variants Creator

Creates logo components with variant support following the established pattern in Elements codebase.

When to use this Skill

  • User provides multiple SVG files for a logo (icon, wordmark, logo variants)
  • User mentions "variants", "light/dark modes", or references Clerk-style logos
  • User wants to add a new logo to the collection with multiple variants
  • User has SVG files in public/test/ or provides paths to logo files

Process

1. Analyze provided SVGs

  • Identify variant types (icon, logo, wordmark)
  • Detect light/dark mode versions (files ending in -dark.svg or -light.svg)
  • Extract viewBox, colors, and dimensions from each SVG
  • Note the brand guidelines if provided

2. Create component file

Location: src/components/ui/logos/{name}.tsx

Props interface:

{
  className?: string;
  variant?: "icon" | "logo" | "wordmark";
  mode?: "dark" | "light";
}

Structure:

  • Use conditional rendering based on variant prop
  • Configure colors for light/dark modes using a COLORS object pattern
  • Default to variant="wordmark" (primary logo)
  • Support theme-aware mode prop
  • Add proper TypeScript types

Reference implementation: Check src/components/ui/logos/clerk.tsx for the exact pattern to follow.

3. Convert SVG to JSX

For each SVG file:

  • Read the SVG file content
  • Convert SVG attributes to JSX (e.g., fill-rulefillRule, stroke-widthstrokeWidth)
  • Replace hardcoded colors with variables from COLORS object
  • Preserve viewBox and dimensions
  • Add title tag for accessibility

4. Create registry structure

Location: registry/default/blocks/logos/{name}-logo/

Files to create:

  1. registry-item.json:
{
  "name": "{name}-logo",
  "type": "registry:block",
  "title": "{DisplayName} Logo",
  "description": "{Brand description}",
  "categories": ["logos"],
  "meta": {
    "hasVariants": true,
    "variants": [
      "icon-dark",
      "icon-light",
      "logo-dark",
      "logo-light",
      "wordmark-dark",
      "wordmark-light"
    ],
    "variantTypes": {
      "base": ["icon", "logo", "wordmark"],
      "modes": ["dark", "light"]
    }
  },
  "files": [
    {
      "path": "components/logos/{name}.tsx",
      "type": "registry:component"
    }
  ],
  "docs": "{Brand} logo with 3 base variants (icon, logo, wordmark) and 2 modes (dark, light) = 6 total combinations. Theme-aware: automatically adapts colors when you switch themes."
}

CRITICAL: The variants array MUST list ALL combinations explicitly in {base}-{mode} format (e.g., "icon-dark", "logo-light"). This is what makes the variant count badge (e.g., "6") appear correctly in the UI. Do NOT just list base names like ["icon", "logo", "wordmark"].

  1. Copy component to: components/logos/{name}.tsx

5. Update registry/index.ts

CRITICAL STEP: The registry/index.ts file is the SOURCE OF TRUTH for the build process. You MUST add/update the logo entry in this file with the EXACT same metadata structure as the registry-item.json.

Location: registry/index.ts

Find the array of registry items and add your logo entry with the complete meta field:

{
  $schema: "https://ui.shadcn.com/schema/registry-item.json",
  name: "{name}-logo",
  type: "registry:block",
  title: "{DisplayName} Logo",
  description: "{Brand description}",
  registryDependencies: [],
  dependencies: [],
  categories: ["logos"],
  meta: {
    hasVariants: true,
    variants: [
      "icon-dark",
      "icon-light",
      "logo-dark",
      "logo-light",
      "wordmark-dark",
      "wordmark-light",
    ],
    variantTypes: {
      base: ["icon", "logo", "wordmark"],
      modes: ["dark", "light"],
    },
  },
  files: [
    {
      path: "registry/default/blocks/logos/{name}-logo/components/logos/{name}.tsx",
      type: "registry:component",
    },
  ],
  docs: "{Brand} logo with 3 base variants (icon, logo, wordmark) and 2 modes (dark, light) = 6 total combinations. Theme-aware: automatically adapts colors when you switch themes.",
}

If updating an existing logo: Search for the logo name in registry/index.ts and replace the entire entry with the new metadata including the meta field.

6. Update logos collection

Add to registry/default/blocks/logos/logos/registry-item.json:

  • Add new logo to the list
  • Ensure it's in the correct category (tech-giants, ai-services, etc.)

7. Build registry

Run:

bun run build:registry

This generates the public registry files.

Component Template Pattern

interface LogoProps {
  className?: string;
  variant?: "icon" | "logo" | "wordmark";
  mode?: "dark" | "light";
}

const COLORS = {
  dark: "#HEX_VALUE",
  light: "#HEX_VALUE",
};

export function BrandLogo({
  className,
  variant = "wordmark",
  mode = "dark",
}: LogoProps) {
  const color = COLORS[mode];

  if (variant === "icon") {
    return (
      <svg className={className} viewBox="...">
        {/* Icon SVG content */}
      </svg>
    );
  }

  if (variant === "logo") {
    return (
      <svg className={className} viewBox="...">
        {/* Logo SVG content */}
      </svg>
    );
  }

  // Default: wordmark
  return (
    <svg className={className} viewBox="...">
      {/* Wordmark SVG content */}
    </svg>
  );
}

Expected outcome

After completion:

  1. Component is available at @/components/ui/logos/{name}
  2. Logo appears in the logos page with variant badge
  3. Context menu shows "View X Variants" option
  4. Variants dialog displays all combinations (variants × modes)
  5. All copy/download functions work for each variant
  6. Can be installed via npx shadcn@latest add @elements/{name}-logo

Brand Guidelines Integration

If brand guidelines are provided:

  • Use exact brand colors specified
  • Follow naming conventions (e.g., Linear uses "Linear" not "linear")
  • Respect hierarchy (wordmark primary, logomark for tight layouts, icon for social)
  • Include usage notes in component comments

Files to reference

  • Template: src/components/ui/logos/clerk.tsx
  • Registry example: registry/default/blocks/logos/clerk-logo/
  • Variants dialog: src/app/docs/logos/logo-variants-dialog.tsx
  • Logos collection: registry/default/blocks/logos/logos/registry-item.json

Common pitfalls to avoid

  • Don't forget to copy component to both src/ and registry/ locations
  • Ensure hasVariants: true is set in registry metadata
  • Don't hardcode colors - use COLORS object for theme support
  • Remember to run build:registry after making changes
  • Test all variant combinations before committing

When not to use it

  • When the user does not provide multiple SVG files for a logo
  • When the user does not mention 'variants', 'light/dark modes', or Clerk-style logos
  • When the user does not want to add a new logo to the collection with multiple variants

Limitations

  • The `variants` array in `registry-item.json` and `registry/index.ts` MUST list all combinations explicitly in `{base}-{mode}` format.
  • The component must follow the established pattern in Elements codebase, referencing `src/components/ui/logos/clerk.tsx`.

How it compares

This skill automates the creation of a theme-aware, variant-based React logo component and its registry entries, unlike manually writing the component and updating multiple registry files.

Compared to similar skills

logo-with-variants side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
logo-with-variants (this skill)48moReviewIntermediate
scroll-experience1016moNo flagsIntermediate
anthropic-frontend-design126moNo flagsIntermediate
infographic-structure-creator15moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

anthropic-frontend-design

chaibuilder

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

1237

infographic-structure-creator

antvis

Generate or update infographic Structure components for this repo (TypeScript/TSX in src/designs/structures). Use when asked to design, implement, or modify structure layouts (list/compare/sequence/hierarchy/relation/geo/chart), including layout logic, component composition, and registration.

110

design-context

WellApp-ai

Refresh UI/UX context from design system, Storybook, and codebase

17

add-template

TonnyWong1052

Add new UI style template to the ui-style-react project. This skill should be used when users want to add a new style template with HTML/CSS code, create a new preview page, or register a template in the system. Triggers include "add template", "create new style", "add new template", or when users provide HTML code for a new UI style.

10

core-components

davila7

Core component library and design system patterns. Use when building UI, using design tokens, or working with the component library.

10

Search skills

Search the agent skills registry