Skip to main content
skill CX Codex

component-search · yonatangross — Claude Code skill: find React components

The component-search Claude Code skill searches 21st.dev for React components and ranks the matches. It runs when a request asks for a UI component or a replacement.

MIT 106 installs ★ 305 updated 2026-10-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yonatangross/orchestkit --skill component-search -a claude-code
Open on GitHub

What component-search does

The skill searches the 21st.dev registry for React components and returns ranked matches with previews, code, and install instructions. It activates for requests to find a component or an alternative to one.

Before searching, it checks package.json and components.json for project details such as the React version, Tailwind use, and component style. With the 21st-dev-magic MCP server connected, results can be browsed and a selected component retrieved. Web search is the fallback; it provides neither component IDs nor install commands.

The 21st-dev-magic MCP server is optional. Without it, the skill searches and browses web pages.

What it helps with

  • find a React component from a description
  • compare component options in the registry
  • match a component to the project's style
  • get component code and installation steps

Example prompts for the agent

  • Find a date picker component for React.
  • Search for a modal component for this project.
  • Find a dark mode switch on 21st.dev.

How to install component-search

1Skills CLI (Vercel)

npx skills add yonatangross/orchestkit --skill component-search -a claude-code

2Manually: put the files in place

~/.claude/skills/component-search/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/component-search/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about component-search

How do I install component-search in Claude Code?

Run npx skills add yonatangross/orchestkit --skill component-search -a claude-code. The skill file is placed at ~/.claude/skills/component-search/SKILL.md.

What does component-search do?

It searches the 21st.dev registry for React components and returns ranked results with previews, code, and installation instructions.

What does component-search need to work?

The 21st-dev-magic MCP server is optional. Without it, the skill searches web pages but cannot return component IDs or installation commands.

Source text

SKILL.md · MIT
---
name: component-search
license: MIT
compatibility: "Claude Code 2.1.277+. Optional: 21st-dev-magic MCP server."
description: "Searches the 21st.dev registry for production React components, ranked with install steps. Use when looking for a UI component or an alternative to one."
argument-hint: "[component description]"
context: fork
# user-typed commands stay interactive; CC >= 2.1.218 backgrounds forks by default (#3093)
background: false
user-invocable: true
effort: low
model: sonnet
allowed-tools: "Read Glob Grep WebFetch WebSearch AskUserQuestion TaskCreate TaskUpdate mcp__21st-dev-magic__search_picker mcp__21st-dev-magic__search mcp__21st-dev-magic__get_component mcp__21st-dev-magic__get_theme mcp__21st-dev-magic__search_logo mcp__21st-dev-magic__get_usage TaskList"
  # 21st-dev-magic MCP. Without these the skill CANNOT reach the server it is
  # named after and silently degrades to the WebSearch/WebFetch scrape below.
  # Read-only surface by design: the catalog-mutating tools (submit_component,
  # edit_component, delete_*, bookmark writes) are deliberately NOT granted —
  # a search skill has no business publishing to or deleting from the registry.
metadata:
  category: workflow-automation
  mcp-server: 21st-dev-magic
  version: "1.1.0"
  author: "OrchestKit"
  complexity: "simple"
  tags: "components, 21st-dev, react, ui, search, registry, tailwind, shadcn"
triggers:
  keywords: ["component search", "find component", "search components", "ui component", "react component", "21st.dev"]
  examples:
    - "search for a date picker component"
    - "find a modal component for React"
    - "are there any good table components on 21st.dev"
  anti-triggers: [implement, build, design, explore, brainstorm]
---

# Component Search

Search 21st.dev's registry of production-ready React components. Returns ranked results with code, previews, and install instructions.

```bash
component-search animated pricing table
component-search sidebar with collapsible sections
component-search dark mode toggle switch
```

## How It Works

```
Query: "animated pricing table with monthly/annual toggle"
  │
  ▼
┌──────────────────────────────┐
│ 21st.dev Magic MCP           │  Search the 21st.dev developer registry
│ @21st-dev/magic              │  Filter: React, Tailwind, shadcn
└──────────┬───────────────────┘
           │
           ▼
┌──────────────────────────────┐
│ Results (ranked by relevance)│
│                              │
│ 1. PricingToggle (98% match) │  ★ 2.3K views · shadcn/ui
│ 2. PricingCards (87% match)  │  ★ 1.8K views · Radix
│ 3. AnimatedPricing (82%)     │  ★ 950 views · Motion
└──────────────────────────────┘
```

## Step 0: Parse Query

```python
QUERY = ""  # Component description

# 1. Create main task IMMEDIATELY
TaskCreate(subject="Component search: {QUERY}", description="Search 21st.dev registry", activeForm="Searching for {QUERY}")

# 2. Create subtasks for each phase
TaskCreate(subject="Parse query and detect project context", activeForm="Detecting project context")  # id=2
TaskCreate(subject="Search component registry", activeForm="Searching registry")                      # id=3
TaskCreate(subject="Present and deliver results", activeForm="Presenting results")                    # id=4

# 3. Set dependencies for sequential phases
TaskUpdate(taskId="3", addBlockedBy=["2"])  # Search needs project context first
TaskUpdate(taskId="4", addBlockedBy=["3"])  # Results need search done

# 4. Update status as you progress
TaskUpdate(taskId="2", status="in_progress")  # When starting
TaskUpdate(taskId="2", status="completed")    # When done — repeat for each subtask

# Detect project context for framework filtering
Glob("**/package.json")
# Read to determine: React version, Tailwind, shadcn/ui, styling approach

# Detect shadcn/ui style for result ranking
Glob("**/components.json")
# Read → "style" field (e.g., "radix-luma", "base-nova")
# Used to prefer components matching the project's visual language
```

## Step 1: Search Registry

### Browse first, and let the USER pick

**The reason is choice, not cost.** Search returns a preview image, a video, the
author and the `installCommand` — enough for a human to recognise the right
component at a glance. The model cannot. Guessing which of eight "command palette"
results the user meant is the failure mode this flow exists to prevent, and it
stays a failure mode on every pricing tier.

**If 21st-dev-magic MCP is available (the real path):**

```python
# 1. BROWSE. Prefer search_picker: same params and results as search, but it
#    renders an inline picker so the USER chooses. Do not pre-filter to one
#    result on their behalf — show the options.
mcp__21st-dev-magic__search_picker(query="{QUERY}", type="component", limit=8)

# 2. PICK — the user selects. Stop here and wait.

# 3. RETRIEVE — the chosen component.
mcp__21st-dev-magic__get_component(id=<demo id from the chosen result>)
```

- If the user only needs to know *whether* something exists, or wants the install
  command, **stop after step 1** — search already answered it.
- `search` returns an `installCommand` containing `?api_key=$API_KEY_21ST`. That
  is a **different env var** from the MCP's `TWENTY_FIRST_API_KEY`; if
  `npx shadcn add` fails auth, that variable is missing from the environment.

### Tier — check it, do not assume it

`get_component` is the only metered tool; `search`, `search_picker`, `search_logo`,
`get_theme` and every list/metadata tool are unmetered on all tiers.

**Call `get_usage` rather than assuming a cap.** It returns `tier` plus
`freeRetrievalsRemaining` (both `null` when unlimited).

| tier | `get_component` |
|---|---|
| `free` | **2 / day** — treat each retrieval as the day's budget: never speculative, never in a loop, never "to compare" |
| `paid` | unlimited — comparing two candidates is fine; the picker step still applies |

Written 2026-08-16 against a free account and corrected 2026-08-17 when the
account went paid: the original text argued the flow from the 2/day cap, which
made it read as obsolete the moment the cap lifted. The cap is a constraint;
letting the user choose is the design.

**If 21st-dev-magic is NOT available (fallback):**
```python
# Genuine fallback ONLY — scraping returns no ids, no install commands, and
# no structured metadata. If the MCP is configured, you should never be here.
WebSearch("site:21st.dev {QUERY} React component")
# Or browse the registry
WebFetch("https://21st.dev", "Search for: {QUERY}")
```

**Alternative generation path — v0.app MCP (2026):**
When the registry doesn't have a matching component, fall back to AI
generation via the v0.app MCP server rather than WebFetch scraping:

```python
# If @vercel/v0-mcp is available
# v0.app generates from the same query and can pin to shadcn style
# (e.g., luma / nova / lyra) via `shadcn apply` after download.
```

This is a **generation** path, not a registry search — results will not
have view counts or stars. Prefer registry search when possible so you
get battle-tested components; use v0.app only when the registry misses.

## Step 2: Present Results

Show top 3 matches with:
- Component name and description
- Match relevance score
- Popularity (views/bookmarks)
- Framework compatibility
- Preview (if available)
- Install command

```python
AskUserQuestion(questions=[{
  "question": "Which component to use?",
  "header": "Component",
  "options": [
    {"label": "{name_1} (Recommended)", "description": "{desc_1} — {views_1} views"},
    {"label": "{name_2}", "description": "{desc_2} — {views_2} views"},
    {"label": "{name_3}", "description": "{desc_3} — {views_3} views"},
    {"label": "None — generate from scratch", "description": "Build a custom component instead"}
  ],
  "multiSelect": false
}])
```

## Step 3: Deliver Component

For the selected component:
1. Show the full source code
2. List dependencies (`npm install` commands)
3. Note any required peer dependencies (Radix, Motion, etc.)
4. Highlight customization points (props, tokens, slots)

## Framework Compatibility

| Project Stack | Search Filter | Notes |
|--------------|---------------|-------|
| React + Tailwind | Default — best coverage | Most 21st.dev components |
| React + CSS Modules | Filter non-Tailwind | Fewer results |
| Next.js App Router | Prefer RSC-compatible | Check "use client" directives |
| Vue / Svelte | Not supported | 21st.dev is React-only |
| shadcn/ui style | Match visual language | Luma→rounded/pill, Nova→compact, Lyra→sharp |

**shadcn v4 style awareness:** When `components.json` has a style (e.g., `"radix-luma"`), prefer components whose visual language matches — rounded pill shapes for Luma, dense layouts for Nova/Mira, sharp edges for Lyra. Components can be adapted post-install, but a closer match reduces customization work.

## Related Skills

- `ork:design-to-code` — Full mockup-to-component pipeline (uses this skill)
- `ork:design-system-tokens` — Adapt components to project tokens
- `ork-extras:ui-components` — Component library patterns

© OrchestKit · MIT · yonatangross/orchestkit

Similar skills

All skills for Frontend and UI →

component-search by other authors comes first.

component-search redpanda-data component-search finds matching Redpanda Connect components for streaming pipelines and unpacks their configuration schemas. CX Codex +1 ★ 8,804repo stars ue-component-model adobe ue-component-model configures AEM Edge Delivery Services blocks for Universal Editor. Reads block JS and CSS, then generates or updates the required JSON models. CX Codex +1 1,600installs webflow-code-component:component-scaffold webflow webflow-code-component:component-scaffold is a Claude Code skill that scaffolds Webflow Code Components with a React 18+ file and .webflow.tsx definition. It checks project dependencies before generating code. CX Codex +1 1,000installs n8n-multi-instance czlonkowski n8n-multi-instance — a skill for Claude Code, Codex, Cursor and other agents that defines routing rules when one n8n-mcp account connects to several n8n instances. CX Codex +1 2,300installs using-n8n-mcp-skills czlonkowski using-n8n-mcp-skills is a Claude Code skill that routes n8n tasks to specialist skills in the pack and sets workflow validation rules. CX Codex +1 2,100installs workflow-automation davila7 workflow-automation — a skill that turns your agent into a workflow architect: durable execution, platform tradeoffs and patterns for jobs that must not lose state. CX Codex +1 1,661installs autogpt-agents Orchestra Research Guides AI coding assistants on building and running continuous AutoGPT agents with visual workflows. Useful for multi-step automations triggered by schedules or webhooks. CX Codex +1 1,100installs

From the same set86

The whole set →
chain-patterns chain-patterns — a set of patterns for multi-stage pipelines: MCP checks, handoff files, checkpoint recovery, isolated worktree agents, and cron monitoring. CX Codex +1 118installs design-to-code design-to-code — a skill for Claude Code that turns screenshots, descriptions, and URLs into React components. Assembles UI elements while reusing existing Storybook pieces and design tokens. CX Codex +1 116installs testing-unit The testing-unit skill provides patterns for unit tests, HTTP mocks, fixtures, and test data in Vitest, Jest, and pytest. It applies while writing tests or setting up test doubles. CX Codex +1 116installs design-context-extract design-context-extract extracts colors, typography, spacing, components, and motion from screenshots, URLs, or recordings. It returns tokens or Tailwind-ready output. CX Codex +1 112installs mcp-visual-output The mcp-visual-output skill for Claude Code transforms MCP tool JSON results into interactive dashboards. It activates when visual data presentation is more effective than plain text output. CX Codex +1 105installs cover Generates missing tests. Runs when new features lack test coverage across unit, integration, or e2e tiers. CX Codex +1 100installs json-render-catalog The json-render-catalog Claude Code skill defines component catalogs that constrain AI-generated interfaces. It comes into play when a project needs typed component definitions or catalog imports from Storybook. CX Codex +1 100installs OrchestKit Docs MCP OrchestKit Docs MCP — a read-only MCP server for OrchestKit documentation. It searches manuals with full-text queries and extracts Markdown pages without credentials. CX Codex +1 ★ 305repo stars

Project sponsors

Companies that keep this analytics open