nafisrayan/100x-agent-toolkit/21st-dev-builder-v2

Claude Code and agent skill by nafisrayan/100x-agent-toolkit

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Build websites and web apps using 21st.dev — the largest marketplace of shadcn/ui-based React Tailwind components with 1400+ components. Use when user mentions "21st.dev", "21st", "ใช้ 21st", "จาก 21st", "build with 21st", "21st component", "21st magic MCP", or references the 21st.dev component registry in any language. Covers building complete sites (landing pages, dashboards, portfolios, e-commerce storefronts, auth pages), browsing and installing individual 21st.dev components into existing projects, and setting up the 21st.dev MCP server. Also trigger when user wants premium UI components specifically from the 21st.dev registry. Do NOT trigger for general web development, standard shadcn/ui, plain Tailwind CSS, React Native, API development, testing, deployment, or any task that doesn't explicitly reference 21st or 21st.dev.

Install

npx vskill@latest install nafisrayan/100x-agent-toolkit/21st-dev-builder-v2

SKILL.md

The same SKILL.md was published earlier as nafisrayan/100x-agent-toolkit/21st-dev-builder-v2.

21st.dev Web Builder v2

Build production-ready websites using 21st.dev — the largest open-source registry of React UI components. You are an expert at discovering, analyzing, selecting, and integrating 21st.dev components to create polished, cohesive web applications.

This skill makes you exceptionally good at:

  • Live discovery — Always fetching the latest components from 21st.dev before building
  • Smart analysis — Evaluating which components best fit the user's needs
  • Design coherence — Maintaining visual consistency across components from different authors
  • Full-stack composition — Building complete multi-page applications, not just isolated pages

Core Knowledge

What is 21st.dev?

An open-source community registry (the "npm for design engineers") with 1400+ React components. Unlike npm packages, components are installed as full source code you own and can customize. Built on shadcn/ui philosophy.

Tech Stack
  • Framework: React 18+ / Next.js (App Router preferred)
  • Styling: Tailwind CSS 4+
  • Primitives: Radix UI
  • Language: TypeScript
  • Install: npx shadcn@latest add "https://21st.dev/r/{author}/{component}"
URL Patterns
PurposeURL Pattern
Browse categoryhttps://21st.dev/s/{slug}
Component detailhttps://21st.dev/r/{author}/{component}
Author profilehttps://21st.dev/{author}
Community searchhttps://21st.dev/community/components/search

Workflow

Phase 1: Project Setup

Check if the project is ready. Look for package.json, tailwind.config.*, and components.json.

New project:

bash
npx create-next-app@latest my-app --typescript --tailwind --eslint --app --src-dir --import-alias "@/*"
cd my-app
npx shadcn@latest init -d

Existing project missing shadcn:

bash
npx shadcn@latest init

Check MCP availability: If 21st_magic_component_builder tool is available, use it as the primary component generation method. Otherwise, use WebSearch + WebFetch + npx install (works perfectly well).

Phase 2: Requirement Analysis

Break down the user's request into a component plan:

  1. Identify the application type — What kind of app or page is being built?
  2. List required sections/features — What does each page need?
  3. Map to component categories — Use the Component Map below
  4. Identify shared components — Which components appear across multiple pages?
Component Map
Building...Search these categories on 21st.dev
Landing pagehero, features, pricing, testimonials, cta, footers, navbars, backgrounds, announcements, clients
Dashboardsidebar, cards, tables, tabs, buttons, menus, badges, numbers
Auth pagessign-ins, sign-ups, forms, inputs, buttons
Blog / Contentcards, texts, images, paginations, scroll-areas
E-commercecards, carousels, badges, buttons, dialogs, inputs, tabs, selects
Form-heavy appinputs, selects, checkboxes, radio-groups, date-pickers, forms, text-areas, toggles
AI / Chat appai-chats, inputs, buttons, cards, spinner-loaders
Settings pageforms, inputs, toggles, tabs, selects, checkboxes, accordions
Portfoliohero, cards, images, texts, scroll-areas, backgrounds, navigation-menus
SaaS producthero, pricing, features, testimonials, navbars, footers, cta, comparisons
Phase 3: Live Component Discovery

Every build session must include live discovery. 21st.dev adds new components constantly — never rely on memory alone.

Discovery Strategy

For each component category you need, follow this search sequence:

Step 1: Browse the category page

WebFetch: https://21st.dev/s/{category-slug}

This shows all available components in that category with names, authors, and popularity.

Step 2: Deep-dive on promising components

WebFetch: https://21st.dev/r/{author}/{component}

View the component's demo, code, dependencies, and installation command.

Step 3: Search for specific styles (if category browsing isn't enough)

WebSearch: "site:21st.dev {specific style or feature}"

Example: site:21st.dev animated gradient hero or site:21st.dev glassmorphism card

Category Slugs Reference

Read references/component-catalog.md for the full catalog of categories with slugs, counts, and top authors. Here are the most-used ones:

Landing Sections: hero, features, pricing, testimonials, cta, footers, navbars, backgrounds, announcements, clients, comparisons, docks, shaders

UI Components: buttons, inputs, cards, selects, sliders, accordions, tabs, dialogs, calendars, ai-chats, tables, badges, dropdowns, alerts, forms, popovers, text-areas, radio-groups, spinner-loaders, paginations, checkboxes, menus, numbers, avatars, carousels, links, toggles, date-pickers, tooltips, toasts, sidebar, sign-ins, sign-ups, file-uploads, file-trees, icons, tags, notifications, empty-states

Phase 4: Component Analysis & Selection

This is where expertise matters most. For each component slot, evaluate candidates on these dimensions:

Selection Criteria (in priority order)
  1. Functional fit — Does it actually do what's needed? Check props, interactivity, responsiveness.
  2. Visual quality — Is it polished, modern, and well-designed? Check the live preview.
  3. Design coherence — Will it look consistent with other selected components? Prefer:
  • Same author for related components (e.g., all navbar + footer from one author)
  • Similar design language (rounded vs. sharp corners, shadow style, spacing)
  • Consistent color system (CSS variable-based components work best together)
  1. Completeness — Does it support dark mode? Is it responsive? Accessible?
  2. Popularity — Higher likes/downloads usually mean better quality and fewer bugs.
  3. Recency — Recently updated components often use newer patterns and APIs.
  4. Dependencies — Fewer external dependencies = easier integration.
Decision Framework
For each component slot:
1. Find 2-3 candidates from category browsing
2. Score each on the criteria above (mentally)
3. If user is involved → present top 2 with preview links + your recommendation
4. If user says "you decide" → pick the best-scoring one
5. Document your choice with reasoning
Author Consistency Strategy

When building a full page or site, try to use components from a small set of authors. This dramatically improves visual coherence. Notable authors with broad component ranges:

  • shadcn — The foundation. Clean, minimal, highly composable.
  • bundui — Animated, modern components.
  • magicui — Motion-rich, creative components.
  • Other prolific authors can be discovered during live browsing.
Phase 4.5: Build vs Install Decision

Not every section needs a 21st.dev component. For each section, decide:

INSTALL from 21st.dev when:

  • The section needs complex interactivity (navbar with dropdowns, pricing toggle, carousel)
  • The section needs polished animations you don't want to write (animated hero, testimonial slider)
  • A 21st.dev component fits the need almost perfectly

WRITE CUSTOM when:

  • The section is simple (feature grid, stats row, basic CTA)
  • No good 21st.dev component exists for this exact need
  • You need very specific layout that would require heavy modification anyway
  • Mixing too many authors would break design coherence

A typical landing page might install 2-3 complex components (hero, navbar, footer) and write 2-3 simple sections (features grid, stats, CTA) custom. This is faster and produces better results than forcing every section through 21st.dev.

Phase 5: Installation & Integration
Install components:
bash
npx shadcn@latest add "https://21st.dev/r/{author}/{component-name}"

What this does:

  • Copies component source code to your project (usually components/ui/ or components/blocks/)
  • Installs required npm dependencies
  • Updates Tailwind config if needed
  • Resolves internal component dependencies
Installation order matters:
  1. Install base/primitive components first (buttons, inputs)
  2. Then composite components that may depend on them (forms, dialogs)
  3. Finally section-level components (hero, pricing)
Post-Install Compatibility Fixes (CRITICAL)

After installing each component, immediately check for these common issues before moving on:

1. `render` prop vs `asChild` conflict: Many newer 21st.dev components use render prop from @base-ui/react, but your project may use standard shadcn asChild. If you see TypeScript errors about render prop:

tsx
// BROKEN: Component uses render prop
<Button render={<a href="/signup" />}>Sign Up</Button>
// FIX: Convert to asChild pattern
<Button asChild><a href="/signup">Sign Up</a></Button>

Check Button, SheetTrigger, SelectTrigger in every installed component.

2. Container width mismatch: Components may assume different max-widths. After installing, verify each component uses a consistent container:

tsx
// If component uses its own container, it may conflict with your layout
// Wrap all sections in a consistent container OR
// Remove the component's internal container and use your own
<section className="py-20">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
{/* component content here */}
</div>
</section>

3. Missing CSS variables: If a component looks invisible or wrong, check that your globals.css defines all required CSS variables. Common missing ones: --border, --ring, --muted, --muted-foreground, --accent, --accent-foreground.

4. framer-motion typing issues: Some components use ease arrays that TypeScript rejects. Fix by casting:

tsx
// BROKEN
ease: [0.16, 1, 0.3, 1]
// FIX
ease: [0.16, 1, 0.3, 1] as const

5. Faint/invisible card backgrounds: Many 21st.dev testimonial and feature cards use extremely subtle gradients (from-muted/50 to-muted/10 or border-t only) that appear invisible on white backgrounds, especially in marquees where edge fades add further transparency. Fix by giving cards visible styling:

tsx
// BROKEN: Nearly invisible
"rounded-lg border-t bg-gradient-to-b from-muted/50 to-muted/10"
// FIX: Clearly visible with depth
"rounded-xl border border-border/60 bg-card shadow-sm"

6. Edge fade gradients too aggressive on marquees: Marquee components often have w-1/3 fade gradients on each side, covering 2/3 of the content area. Reduce to w-1/6 so cards remain visible:

tsx
// BROKEN: Covers too much
"absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-background"
// FIX: Subtle fade
"absolute inset-y-0 left-0 w-1/6 bg-gradient-to-r from-background"

7. Gradient colors with oklch(): Tailwind v4 uses oklch() for color values, but oklch is poorly rendered in radial-gradient() and some gradient contexts. Use rgba() or hex values for custom gradients:

tsx
// BROKEN: oklch in gradients renders poorly
"bg-[radial-gradient(ellipse_at_center,_oklch(0.55_0.28_285_/_0.18)_0%,_transparent_65%)]"
// FIX: Use rgba for reliable gradient rendering
"bg-[radial-gradient(ellipse_at_center,_rgba(139,92,246,0.18)_0%,_transparent_65%)]"

8. Gradient backgrounds behind parent backgrounds (z-index trap): Don't put gradient decorative elements with -z-10 behind a parent that has its own bg-background. The parent's opaque background covers the gradient. Instead, apply the gradient directly on the section:

tsx
// BROKEN: Gradient div behind parent bg-background
<section className="bg-background">
<div className="-z-10 bg-gradient-to-b ..."> {/* invisible! */}

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
3

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/nafisrayan/100x-agent-toolkit/21st-dev-builder-v2/badge)](https://verified-skill.com/skills/nafisrayan/100x-agent-toolkit/21st-dev-builder-v2)

Something wrong with this skill or its page? Tell us.