21st.dev — UI Component Registry for AI Agents
21st.dev is a UI component registry designed for AI coding agents. It provides MCP tools to search 12,000+ community components, generate new UI with variants, search logos, and publish/share components.
Source: 21st.dev | MCP: docs.21st.dev/mcp
When to Use
- Building UI with an AI agent and need production-ready components
- Searching for React/Next.js/Tailwind components by category
- Generating new UI components with variants
- Searching for logos by industry/style
- Publishing your own components to a team library
- Need design system tokens or theme generation
MCP Setup
21st.dev exposes an HTTP MCP server. Get an API key at 21st.dev/mcp.
{
"mcpServers": {
"21st": {
"url": "https://21st.dev/api/mcp",
"headers": { "x-api-key": "YOUR_21ST_API_KEY" }
}
}
}
Or install via CLI:
npx @21st-dev/cli@latest init --client claude # or: cursor | vscode | windsurf | codex
Core MCP Tools
| Tool |
Purpose |
Example |
search |
Search components/themes/templates |
"hero section SaaS" |
generate |
Generate new UI with variants |
"pricing table 3 tiers" |
get_inspiration |
Get inspiration from existing components |
"dashboard sidebar" |
search_logo |
Search logos by query |
"tech startup minimal" |
get_component |
Retrieve a specific component by ID |
— |
publish |
Publish a component to the registry |
— |
bookmark |
Bookmark components for later |
— |
Workflow
1. Search for Existing Components
User: "Find a hero section for a SaaS landing page"
→ search("hero section SaaS landing") → returns matching components
→ Select best fit → retrieve code → adapt to project
2. Generate New UI
User: "Create a pricing table with 3 tiers"
→ generate("pricing table 3 tiers monthly annual toggle")
→ Returns component code + variants
→ Select variant → integrate
3. Logo Search
User: "Find a minimal tech logo"
→ search_logo("minimal tech startup")
→ Returns logo options → select → download
4. Publish Component
User: "Publish this button component to 21st"
→ publish(component_code, metadata)
→ Component available in registry
Component Categories
- Hero — Landing page heroes, headers, CTAs
- Pricing — Pricing tables, toggle, comparison
- Navigation — Navbars, sidebars, breadcrumbs
- Forms — Login, signup, contact, multi-step
- Cards — Product, feature, testimonial, blog
- Tables — Data tables, dashboards, pricing
- Footers — Simple, multi-column, newsletter
- Testimonials — Quotes, ratings, carousels
- CTAs — Call-to-action sections
- Features — Feature grids, icon lists
- Stats — Metrics, counters, KPIs
- FAQ — Accordions, toggles
- Blog — Post cards, lists, grids
- Gallery — Image grids, lightboxes
- Modals — Dialogs, drawers, popovers
- Authentication — Login, register, forgot password
- Empty States — No data, 404, loading
- Onboarding — Tours, tooltips, walkthroughs
Supported Stacks
- React / Next.js
- Tailwind CSS
- shadcn/ui
- HTML/CSS
- Vue (limited)
- Astro (limited)
Integration with Other Skills
- ui-ux-pro-max — Use 21st.dev to find components that match the design system generated by ui-ux-pro-max
- shadcn/ui — Many 21st components are built on shadcn/ui primitives
- tailwind-advanced — Components use Tailwind classes; customize with tailwind-advanced patterns
- frontend-design — Use 21st components as starting points for custom designs
When NOT to Use
- Need a full page layout (use ui-ux-pro-max design system generation)
- Need complex animations (use motion.dev)
- Need brand identity (use brand skill)
- Need backend/API components (not a 21st.dev use case)
- Project doesn't use React/Tailwind (limited support for other stacks)
Red Flags
- Copy-pasting without adaptation: Always customize components to match your design system
- Ignoring accessibility: Verify components meet WCAG standards before shipping
- Over-reliance on registry: Custom designs often outperform generic components
- Not checking license: Verify component license before commercial use
Verification
Process
- Analyze UI requirements
- Search 21st.dev for matching components
- Select best-fit component(s)
- Generate variants if needed
- Customize to match design system
- Verify accessibility and responsiveness
- Integrate into project
Anti-Rationalization Table
| Rationalization |
Reality |
| "Registry components are production-ready" |
Always audit for accessibility, performance, and design consistency |
| "I'll customize later" |
Uncustomized generic components look generic — customize from the start |
| "All components are free" |
Check licenses; some require attribution or have usage limits |
| "One component is enough" |
Combine multiple components for complex UIs; don't force-fit |
1---2name: 21st-dev3description: Use when UI component registry for AI coding agents — search, generate, and publish React/Next.js/Tailwind components via MCP. 12,000+ community components, logo search, design system tokens, theme generation. Use when building UI with agent, need production components, want to publish/share components.4license: MIT5---67# 21st.dev — UI Component Registry for AI Agents8921st.dev is a UI component registry designed for AI coding agents. It provides MCP tools to search 12,000+ community components, generate new UI with variants, search logos, and publish/share components.1011Source: [21st.dev](https://21st.dev) | MCP: [docs.21st.dev/mcp](https://docs.21st.dev/mcp)1213## When to Use1415- Building UI with an AI agent and need production-ready components16- Searching for React/Next.js/Tailwind components by category17- Generating new UI components with variants18- Searching for logos by industry/style19- Publishing your own components to a team library20- Need design system tokens or theme generation2122## MCP Setup232421st.dev exposes an HTTP MCP server. Get an API key at [21st.dev/mcp](https://21st.dev/mcp).2526```json27{28 "mcpServers": {29 "21st": {30 "url": "https://21st.dev/api/mcp",31 "headers": { "x-api-key": "YOUR_21ST_API_KEY" }32 }33 }34}35```3637Or install via CLI:38```bash39npx @21st-dev/cli@latest init --client claude # or: cursor | vscode | windsurf | codex40```4142## Core MCP Tools4344| Tool | Purpose | Example |45|------|---------|---------|46| `search` | Search components/themes/templates | "hero section SaaS" |47| `generate` | Generate new UI with variants | "pricing table 3 tiers" |48| `get_inspiration` | Get inspiration from existing components | "dashboard sidebar" |49| `search_logo` | Search logos by query | "tech startup minimal" |50| `get_component` | Retrieve a specific component by ID | — |51| `publish` | Publish a component to the registry | — |52| `bookmark` | Bookmark components for later | — |5354## Workflow5556### 1. Search for Existing Components5758```59User: "Find a hero section for a SaaS landing page"60→ search("hero section SaaS landing") → returns matching components61→ Select best fit → retrieve code → adapt to project62```6364### 2. Generate New UI6566```67User: "Create a pricing table with 3 tiers"68→ generate("pricing table 3 tiers monthly annual toggle")69→ Returns component code + variants70→ Select variant → integrate71```7273### 3. Logo Search7475```76User: "Find a minimal tech logo"77→ search_logo("minimal tech startup")78→ Returns logo options → select → download79```8081### 4. Publish Component8283```84User: "Publish this button component to 21st"85→ publish(component_code, metadata)86→ Component available in registry87```8889## Component Categories9091- **Hero** — Landing page heroes, headers, CTAs92- **Pricing** — Pricing tables, toggle, comparison93- **Navigation** — Navbars, sidebars, breadcrumbs94- **Forms** — Login, signup, contact, multi-step95- **Cards** — Product, feature, testimonial, blog96- **Tables** — Data tables, dashboards, pricing97- **Footers** — Simple, multi-column, newsletter98- **Testimonials** — Quotes, ratings, carousels99- **CTAs** — Call-to-action sections100- **Features** — Feature grids, icon lists101- **Stats** — Metrics, counters, KPIs102- **FAQ** — Accordions, toggles103- **Blog** — Post cards, lists, grids104- **Gallery** — Image grids, lightboxes105- **Modals** — Dialogs, drawers, popovers106- **Authentication** — Login, register, forgot password107- **Empty States** — No data, 404, loading108- **Onboarding** — Tours, tooltips, walkthroughs109110## Supported Stacks111112- React / Next.js113- Tailwind CSS114- shadcn/ui115- HTML/CSS116- Vue (limited)117- Astro (limited)118119## Integration with Other Skills120121- **ui-ux-pro-max** — Use 21st.dev to find components that match the design system generated by ui-ux-pro-max122- **shadcn/ui** — Many 21st components are built on shadcn/ui primitives123- **tailwind-advanced** — Components use Tailwind classes; customize with tailwind-advanced patterns124- **frontend-design** — Use 21st components as starting points for custom designs125126## When NOT to Use127128- Need a full page layout (use ui-ux-pro-max design system generation)129- Need complex animations (use motion.dev)130- Need brand identity (use brand skill)131- Need backend/API components (not a 21st.dev use case)132- Project doesn't use React/Tailwind (limited support for other stacks)133134## Red Flags135136- **Copy-pasting without adaptation**: Always customize components to match your design system137- **Ignoring accessibility**: Verify components meet WCAG standards before shipping138- **Over-reliance on registry**: Custom designs often outperform generic components139- **Not checking license**: Verify component license before commercial use140141## Verification142143- [ ] Component matches design system tokens144- [ ] Accessibility verified (contrast, keyboard nav, ARIA)145- [ ] Responsive at all breakpoints146- [ ] License checked for commercial use147- [ ] Customized to match brand identity148149## Process1501511. Analyze UI requirements1522. Search 21st.dev for matching components1533. Select best-fit component(s)1544. Generate variants if needed1555. Customize to match design system1566. Verify accessibility and responsiveness1577. Integrate into project158159## Anti-Rationalization Table160161| Rationalization | Reality |162|---|---|163| "Registry components are production-ready" | Always audit for accessibility, performance, and design consistency |164| "I'll customize later" | Uncustomized generic components look generic — customize from the start |165| "All components are free" | Check licenses; some require attribution or have usage limits |166| "One component is enough" | Combine multiple components for complex UIs; don't force-fit |