← All posts

21st.dev: what it costs, what changed, and what I found testing 216 components

I tested 216 components on 21st.dev for licenses, dependencies, speed and accessibility. Here's what it costs, what changed with the 21st MCP, and who should pay.

21st.dev: what it costs, what changed, and what I found testing 216 components, next to a laptop showing UI components under a magnifying glass

You’ve probably seen a website lately with a glowing gradient hero, a pricing table that lights up when you hover, and testimonials sliding past on their own. There’s a good chance a lot of it came from 21st.dev.

21st.dev is a library of more than 12,000 website components built with React and Tailwind. Designers and developers publish them, and anyone can preview them, copy them, or have an AI coding tool pull them straight into a project. It’s become a go-to source for people building sites with Cursor, Claude Code and Lovable.

I build websites for a living, so I wanted to know if it’s worth it. Most reviews of it are out of date. They list prices that no longer exist and setup steps for a tool that’s since been renamed. Almost none of them test the components themselves.

So I did. I pulled the details on 216 components across the sections you’d use on a business website: heroes, features, calls to action, pricing, testimonials, navigation, footers and forms. I checked every one for its license and what it needs to run, then ran Google Lighthouse on 40 of them for speed and accessibility.

My honest take, up front: 21st.dev is a great place to find ideas and a decent place to find code, but the free plan is nearly useless now, and most components don’t come with a clear license. If you build sites for clients, that second part matters more than anything else on this page.

What is 21st.dev?

21st.dev calls itself a community catalog of React and Tailwind components. Think of it as a giant shelf of website parts. Each one has a live preview you can click around in, the full code, and an install command.

There are three ways to use a component:

  1. Copy the code and paste it into your project.
  2. Install it with one command using the shadcn command line tool, the same way you’d add a shadcn/ui component.
  3. Let your AI coding tool fetch it through the 21st MCP, a plugin for Cursor, Claude Code, Codex, VS Code and Windsurf.

Every component also has a Copy prompt button. It gives you a written description you can paste into v0, Lovable or any other AI builder so it can recreate the component in your project.

Next to the library there’s 21st AI, which generates new components from a description, plus templates, themes, an icon library and a newer tool called Design Bug Bot that reviews your pull requests for design problems.

Don’t mix these up

Searching for “21st” gets confusing fast. These are four different things:

Name What it is
21st.dev The component library this post is about
21st (Agents SDK) The same company’s newer product for putting AI agents inside apps, backed by Y Combinator
Magic UI A separate animated component library by Dillion Verma. Its components are also listed on 21st.dev, but it isn’t 21st’s product
news.21st.dev A link-sharing community site for UI designers

The old “Magic” name causes a lot of the confusion. The MCP used to be called Magic MCP, and 21st AI used to be called Magic Chat. More on that below.

My quick verdict

My scores · out of 10
6.2average across six areas
Finding ideas9/10Huge range, live previews, easy to search
Code quality7/10Most scored well in my Lighthouse tests, but heroes and forms need work
Licensing3/10Most components don’t list a usable license
Free plan3/102 installs a day, and every install needs an API key
Price of paid plan8/10$6 a month for unlimited installs is cheap
Works outside Next.js7/10Fine in Vite and Astro, but some components import Next.js

How much does 21st.dev cost?

This is where most other reviews get it wrong. You’ll see “$20 a month Pro,” “10 free credits” and “5 free tokens” quoted all over the place. Those were real plans at one point. They aren’t now.

Here’s the current pricing from 21st.dev’s own pricing page:

Plan Billed yearly Billed quarterly What you get
Free $0 $0 Browse everything, 2 copies or installs per day, no AI, 5 free Design Bug Bot reviews
Builder $6/mo $8/mo Unlimited installs and copies, no AI credits
Builder + AI (500 credits) $15/mo $20/mo Everything in Builder plus 21st AI
Builder + AI (1,000 credits) $30/mo $40/mo Same, more credits
Builder + AI (2,000 credits) $60/mo $80/mo Same, more credits
Team Builder $7.50/seat/mo – Shared collections, central billing, admin controls
Team Builder + AI $18.75/seat/mo – Team features plus a shared credit pool

Extra credits cost $5 per 100 on any plan with AI. There’s no monthly billing option. The shortest term is three months.

Is 21st.dev free?

You can browse for free, and that’s about it.

When I tried to install a component without an account, even a plain accordion that shadcn released under the MIT license, the server refused with “Authentication required.” Every one of the 216 components I looked at now shows an install command that includes an API key. A free account gets you 2 installs or code copies a day across the website, the MCP and the command line combined.

Two a day is enough to try it out. It’s not enough to build a page. A typical landing page uses six to ten components.

What does a credit buy?

21st.dev doesn’t give a fixed price per generation. It charges based on which AI model you pick and how much work the request takes, and shows you the cost after each one. That makes it hard to plan around. Monthly credits also don’t roll over, so unused ones disappear at the end of the month. Credits from extra packs do roll over.

If you only want the components and not the AI generator, Builder at $6 a month is the plan to look at. You can use your own AI tool (Claude Code, Cursor, ChatGPT) to customize what you install.

How to use 21st.dev

Install a component with the shadcn command line

This works in any React project that’s set up for shadcn/ui.

  1. Sign in at 21st.dev and create an API key at 21st.dev/mcp.
  2. Save it in your terminal as API_KEY_21ST.
  3. Open the component you want, copy its install command, and run it from your project folder. It looks like this:
npx shadcn@latest add "https://21st.dev/r/shadcn/accordion?api_key=$API_KEY_21ST"

The code is copied into your project, not added as a package. You own it, and you can change anything.

Use 21st.dev with Astro

21st.dev says its components work “anywhere React runs,” and Astro is on its list. Astro runs React components as islands, so the steps are:

  1. Add React and Tailwind to your Astro project: npx astro add react tailwind.
  2. Set up shadcn/ui: npx shadcn@latest init. The shadcn command line supports Astro.
  3. Install the component with its 21st.dev command, as above.
  4. Use it in a page and tell Astro when to load it. Use client:load for anything interactive above the fold and client:visible for everything else. A component with no interactivity doesn’t need a client: directive at all, so it ships no JavaScript.

One thing to check first: about 1 in 8 components in my sample list next as a dependency. They usually use next/image or next/link. Those won’t run in Astro or Vite as written. Swap them for a normal <img> and <a> before you use them.

Using 21st.dev with AI coding tools

21st.dev runs an MCP server, the 21st MCP (it used to be called Magic MCP). MCP is a standard way for AI coding tools to use outside services. Once it’s connected, you can type “add a pricing section with three tiers” and your AI tool searches 21st.dev, picks a real component and puts it in your project, instead of making one up.

What your AI tool can do once it’s connected

Tool What it does Cost
search Searches components, themes and templates Free
get_component Pulls a component’s code into your project Counts toward your 2 a day on the free plan, unlimited on Builder
get_inspiration Finds components that fit your project’s stack and style Search, so free
search_logo Finds SVG logos for brands and tools Free, no limit
generate Creates a brand-new component with 21st AI Uses AI credits

Search and install through the MCP now work even with AI generation turned off. That means the $6 Builder plan is enough for the MCP to be useful. You only need credits if you want 21st.dev to generate new components.

Setup that’s the same in every tool

The setup changed recently, so ignore older guides.

  1. Create an API key at 21st.dev/mcp. You need a free account.
  2. Run the setup command for your tool from your project folder:
npx @21st-dev/cli@latest init --client cursor
  1. Add your key. By default the command prints the settings your tool needs, with a placeholder where the API key goes. Add --write to the end and it saves them to your tool’s settings file for you. Either way, replace the placeholder with your key.
  2. Restart your AI tool so it picks up the new server.

The --client options are claude, cursor, codex, vscode and devin. Windsurf users can type windsurf, which 21st treats the same as devin.

Never paste your API key into a file you commit to GitHub. Anyone who sees it can use your 21st.dev account.

How to use 21st.dev with Claude Code

Claude Code is where the MCP fits most naturally, because Claude Code already works inside your project and edits your files directly.

  1. Connect it. From your project folder, run npx @21st-dev/cli@latest init --client claude --write and add your API key.
  2. Check it’s working. Start Claude Code and type /mcp. 21st should be in the list of servers. You can also run claude mcp list in your terminal.
  3. Ask in plain words. For example:
    • “Find a 21st.dev pricing section with three tiers and add it to the homepage.”
    • “Show me three hero sections from 21st.dev with a split image layout, and tell me which one fits our current style. Don’t install anything yet.”
    • “Get a 21st.dev testimonial slider and restyle it with our Tailwind colors and fonts.”
  4. Review the changes. Claude Code asks before it edits files and shows you every change, so read the component before you accept it.

What works well in Claude Code:

  • Put your rules in CLAUDE.md. Claude Code reads this file at the start of every session. A few lines like “only use 21st.dev components with an MIT license” and “match our existing colors, fonts and border radius” save you from repeating yourself.
  • Look before you install. Ask it to search and show you options first, like the second example above. Searching is free, but every component it pulls counts toward your daily limit on the free plan.
  • Let it do the cleanup. Claude Code is good at the boring follow-up: swapping placeholder images, rewriting the text, and replacing next/image with a plain <img> if you’re not on Next.js.

How to use 21st.dev with Cursor

Cursor was one of the first editors 21st.dev supported, so a lot of the older guides you’ll find online are written for it.

  1. Connect it. Run npx @21st-dev/cli@latest init --client cursor --write and add your API key.
  2. Check it’s working. Open Cursor’s settings and find the MCP section. 21st should be listed and switched on, with its tools showing underneath.
  3. Use Agent mode. Open the chat and make sure it’s set to Agent, not Ask. MCP tools only run when the agent is allowed to take actions.
  4. Ask for a component. For example:
    • “Use 21st.dev to find a sticky navbar with a mobile menu and add it to the layout.”
    • “Find a 21st.dev FAQ accordion and use it on the services page with our existing questions.”
  5. Approve the tool calls. Cursor asks before it runs an MCP tool, unless you’ve turned that off. Each approval is one search or one component pull, so it’s an easy way to keep an eye on your daily limit.

What works well in Cursor:

  • Put your rules in .cursor/rules. This is Cursor’s version of a project instructions file. Add your license rule, your stack and your design rules there.
  • Mention the tool by name. Adding “use 21st.dev” or “use the 21st MCP” to your request makes Cursor reach for it instead of writing a component from scratch.
  • Keep the chat focused. Ask for one section at a time. A request like “build me a whole landing page from 21st.dev” pulls lots of components from different authors that won’t match.

How to use 21st.dev with OpenAI Codex

Codex works with the 21st MCP in both the Codex command line tool and its editor extension.

  1. Connect it. Run npx @21st-dev/cli@latest init --client codex --write and add your API key. Codex keeps its MCP settings in ~/.codex/config.toml.
  2. Check it’s working. Start Codex and type /mcp to see the servers it’s connected to.
  3. Ask for a component. For example:
    • “Search 21st.dev for a contact form with name, phone and message fields. Show me the top three before you install one.”
    • “Add a 21st.dev footer with four link columns and match the header’s styling.”

What works well in Codex:

  • Put your rules in AGENTS.md. Codex reads this file in your project for instructions, so it’s the place for your license, stack and design rules.
  • Ask for a plan first. Codex is good at laying out what it’ll change before it changes it. For anything bigger than one component, ask it to list the components it plans to use and where they’ll go.

How to use 21st.dev with VS Code and GitHub Copilot

If you use VS Code with GitHub Copilot, Copilot’s agent can use the 21st MCP.

  1. Connect it. Run npx @21st-dev/cli@latest init --client vscode --write and add your API key. VS Code keeps project MCP settings in .vscode/mcp.json.
  2. Check it’s working. Open the Command Palette and run MCP: List Servers. 21st should be there and running.
  3. Switch Copilot Chat to Agent mode. MCP tools only work in Agent mode. Click the tools icon in the chat box to see the 21st tools and turn them on.
  4. Ask for a component. For example:
    • “Use 21st.dev to add a pricing table with a monthly and yearly toggle.”
    • “Find a 21st.dev logo cloud and add our partner logos to it.”

What works well with Copilot:

  • Put your rules in .github/copilot-instructions.md. Copilot reads this file for project instructions.
  • Don’t commit your key. .vscode/mcp.json often ends up in Git. If it holds your API key, add it to .gitignore or use VS Code’s input prompt for the key instead.

How to use 21st.dev with Windsurf

Windsurf’s AI agent, Cascade, can use the 21st MCP too.

  1. Connect it. Run npx @21st-dev/cli@latest init --client windsurf --write and add your API key.
  2. Check it’s working. Open Windsurf’s settings and find the MCP servers section under Cascade. Refresh the list if 21st doesn’t show up right away.
  3. Ask Cascade for a component. For example:
    • “Find a 21st.dev hero with a background video and add it to the homepage.”
    • “Use 21st.dev to add a testimonials grid with star ratings.”

What works well in Windsurf:

  • Use Windsurf’s rules. Add your license, stack and design rules to your project rules so Cascade follows them every time.
  • Watch the tool count. Windsurf limits how many MCP tools can be switched on at once. If you’ve connected a lot of servers, turn off the ones you’re not using so 21st’s tools stay available.

How to use 21st.dev with Lovable, v0, Bolt and other AI builders

Browser-based builders like Lovable, v0 and Bolt don’t connect to the 21st MCP the same way. You don’t need them to. Every component on 21st.dev has a Copy prompt button.

  1. Find a component you like on 21st.dev.
  2. Click Copy prompt. You get a written description of the component, ready for an AI tool.
  3. Paste it into your builder and add anything specific to your project, like “use our brand colors” or “make the button say Book a free quote.”

You won’t get the exact same code, because the builder writes its own version. But it usually comes out close, and it fits the rest of your project better than pasted code would. Copying a prompt still counts toward your 2 free copies a day.

This is also the best route if your project isn’t React. A builder can turn the prompt into Vue, Svelte or plain HTML, which 21st.dev’s own code can’t do.

The same works in a regular chat with ChatGPT or Claude. Paste the prompt, or the component’s code, and ask it to rebuild the component for your setup.

Tips that work in every AI tool

These matter more than which tool you pick:

  • Set a license rule. In my test, nearly two thirds of components had no usable license. Tell your tool to only use components marked MIT, and put that rule in its instructions file so it sticks.
  • Tell it your stack. If you’re not on Next.js, say so. About 1 in 8 components import Next.js and need a small fix to run anywhere else.
  • Match your design. Ask the tool to restyle every component it adds to your colors, fonts, border radius and animation speed. This is what stops a site from looking pieced together.
  • Search first, install second. Searching is free. On the free plan, pulling code is limited to 2 a day, so look at options before you spend one.
  • Read what it adds. The AI tool installs whatever the author wrote. You’re still the one shipping it.
Tool Setup command Where to put your rules
Claude Code --client claude CLAUDE.md
Cursor --client cursor .cursor/rules
OpenAI Codex --client codex AGENTS.md
VS Code + Copilot --client vscode .github/copilot-instructions.md
Windsurf --client windsurf Windsurf project rules
Lovable, v0, Bolt Use Copy prompt Your builder’s project settings

Moving from Magic MCP

If you set up the older Magic MCP, here’s what changed:

  • Your old API key no longer works. Keys from the Magic console were reset, so generate a new one at 21st.dev/mcp.
  • The old package still works. @21st-dev/magic now forwards to the new server, so old configs keep running once the key is updated.
  • The tool names changed. 21st_magic_component_builder is now generate, 21st_magic_component_inspiration is now get_inspiration, and logo_search is now search_logo. If you have prompts or rules that call the old names, update them.

What people love about 21st.dev

I read through Product Hunt reviews, developer blogs, review sites and the coverage of its launches. The praise is pretty consistent:

  • It saves a lot of time. One reviewer said it gave them components “that would have taken days to build manually.” Animated and 3D components get the most love.
  • It fits how developers already work. Because it uses the shadcn format, components drop into an existing project the same way shadcn/ui ones do.
  • The previews are good. You can click and resize a component before you take it, which beats guessing from a screenshot.
  • The MCP feels like the future. Being able to ask your coding tool for a component and get a real one, not one it made up, is the feature people mention most.

It’s also popular. The company says more than 1.4 million developers have used it, and Y Combinator backed it.

What people complain about

  • Quality is uneven. Anyone can publish, so you’ll find polished, production-ready components next to rough experiments. As one comparison put it, a component often looks right in a screenshot more often than it works right with a keyboard.
  • Mixed components don’t match. A hero from one author, a pricing table from another and a footer from a third come with three different animation styles and three different corner radiuses. On one page, you can tell.
  • Credits run out fast. One early fan wrote that their excitement faded once they saw how quickly they burned through credits, and called it overpriced next to the AI subscriptions they already paid for.
  • The free plan shrank. It went from a monthly allowance of free AI generations to 2 copies a day with no AI. There’s a “21st dev is no longer free” thread that sums up how people felt about it.
  • It’s React only. No Vue, no Svelte. Only the icon library has Vue versions.
  • It isn’t open source. Unlike shadcn/ui, the 21st.dev platform itself is closed. The MCP proxy package is open source, but the service behind it isn’t.

I didn’t find any real discussion of 21st.dev on Reddit or Hacker News through search, so most of this comes from blogs, review sites and Product Hunt. Keep that in mind. People who write blog posts about a tool tend to like it more than people who quietly stopped using it.

I tested 216 components. Here’s what I found.

I took the first 30 components on 21st.dev in each of eight categories you’d use on a business website: hero, features, call to action, pricing, testimonials, navigation, footer and form. After removing duplicates and three broken pages, that left 216. For each one I recorded the license and the npm packages it depends on, both of which 21st.dev lists on every component page.

Then I ran Google Lighthouse on the live preview of 40 of them, five from each category, to check speed and accessibility.

Most components don’t have a usable license

This was the biggest surprise.

License check · 216 components
62.5%had no usable license
Licenses shown on 216 popular 21st.dev components
License shownComponentsShareFor client work
MIT7736%OK to use
MIT-031%OK to use
AGPL-3.010.5%Avoid
Unknown11151%Ask the author
No license2411%Ask the author

That means nearly two thirds of the components (62.5%) had no usable license. When code has no license, the author keeps all rights by default. You can look at it, but you don’t have clear permission to copy it into a client’s website.

The single AGPL-3.0 component is a trap of its own. AGPL is a “copyleft” license. Use it in a project and you may be required to release that project’s source code too. Most client sites can’t do that.

21st.dev’s homepage says that once you install a component you “own it and can change it.” That’s true of the copy in your project. It doesn’t settle who owns the rights to the original.

What to do: before you use a component on a site that matters, open its page and look for “License: mit.” If it says “unknown” or “no-license,” either message the author or treat it as inspiration and build your own version.

Dependencies are lighter than people think

A common worry is that these components bloat your site. The npm packages they need don’t back that up:

  • 1npm package for the typical component. 71 of 216 needed none.
  • 41%use lucide-react, an icon set. The most common one.
  • 16%use an animation library like Framer Motion, Motion or GSAP.
  • 4use 3D or heavy graphics libraries.
  • 12.5%depend on next, so they need edits outside Next.js.

One caveat: this counts npm packages only. Some components also pull in other shadcn/ui components, which this doesn’t count.

Speed and accessibility are mostly good

I ran Google Lighthouse on the live preview of 40 components, five from each category, using its standard mobile test. They came out better than I expected.

  • 97/100Median performance score
  • 35of 40Scored 90 or above on performance
  • 100/100Median accessibility score
  • 26of 40Perfect accessibility score
  • 0Scored below 80 on either
  • 0Layout shift problems
Lighthouse by category · mobile
90 or aboveBelow 90
Median Lighthouse scores for 40 21st.dev components, by category
CategoryPerformanceAccessibility
Hero78100
Features98100
Call to action98100
Pricing9895
Testimonials97100
Navigation98100
Footer98100
Form9791

Heroes are the slow ones, and it’s the images. Hero sections had a median performance score of 78, and three of the five took over 5 seconds to show their main content on a simulated phone. Two of those three used no extra packages at all. They were slow because of large images. The slowest component overall was a features section that weighed 1.3 MB and took 9 seconds. If you use a hero from 21st.dev, swap in your own compressed images. It’s the single biggest speed fix.

Forms have the most accessibility problems. The most common issue across all 40 was low color contrast (7 components), usually light gray text on white. Forms also had inputs and dropdowns without labels, which means a screen reader can’t tell people what to type. These are quick fixes, but you have to know to look for them.

A fair warning about these numbers: Lighthouse tests each component on its own, and its automatic checks only catch part of what makes a site accessible. They don’t test whether you can use a component with a keyboard, whether focus is visible, or whether animations respect the “reduce motion” setting. Reviewers say that’s where community components fall down most, so check those yourself.

How to keep a 21st.dev site from looking AI-made

Even 21st.dev’s own blog admits the problem with AI-built sites is that they all look the same. Mostly that’s because everyone starts from the same popular components and ships them untouched. A few things fix most of it:

  • Pick one style and stick to it. Choose one corner radius, one shadow and one animation speed, and change every component to match. This is the biggest difference between a site that looks pieced together and one that looks designed.
  • Use your own colors and fonts. Set them once in your Tailwind theme so every component picks them up.
  • Rewrite the text. Placeholder copy like “Transform your workflow” is the fastest giveaway.
  • Cut the animation. One animated element per screen is plenty. Five is a tech demo.
  • Check it with a keyboard. Tab through the page. If you can’t see where you are or can’t reach a button, fix it before launch.

Using 21st.dev for client work

If you’re building sites for clients, here’s how I’d handle it:

  1. Only use components marked MIT (or MIT-0) unless you have the author’s written permission.
  2. Never use AGPL components on a client site unless the client is fine with publishing its source code.
  3. Save the license and the component’s URL in your project, so you can show where the code came from later.
  4. Read the code before you ship it. You’re responsible for what’s on the site, not 21st.dev.
  5. Run Lighthouse and a keyboard check on the finished page, not just on the component on its own.

It’s a bit more work than copy and paste. But it’s a lot less work than explaining to a client why their homepage has someone else’s code on it.

21st.dev alternatives

Tool Best for Price Notes
shadcn/ui Solid, accessible basics Free, MIT The foundation most 21st.dev components are built on. Plain looks, very reliable
Magic UI Animated marketing sections Free, with a paid Pro One author, so the style is consistent
Aceternity UI Flashy animated effects Free, with paid templates Also one author, also listed on 21st.dev
v0 Generating a component from a description Free tier, then paid Makes new code instead of finding existing code
Lovable Building a whole app or site from a prompt Free tier, then paid Less control over individual components
SceneAI Animated hero sections as AI prompts 50 free designs, then $49/mo Prompts, not code. Check the results on a phone

The short version: if you want reliable building blocks, start with shadcn/ui. If you want one consistent animated look, use Magic UI or Aceternity directly. If you want the widest range to choose from and don’t mind checking licenses, 21st.dev is the biggest shelf around.

Who should use 21st.dev, and who shouldn’t

It’s a good fit if you:

  • Build in React or Next.js and use Cursor, Claude Code or a similar tool
  • Want ideas and starting points, not a finished design system
  • Are fine paying $6 a month for unlimited installs

Skip it, or use it only for ideas, if you:

  • Build in Vue, Svelte or plain HTML
  • Need every piece of code on a client site to be clearly licensed
  • Want a free tool. The free plan is too limited to build with

For my own work, I use it the way I’d use Dribbble: to see what’s possible and steal good ideas, not to copy and paste a whole site. When a component is MIT licensed and well built, it saves me real time. When it isn’t, I rebuild it myself in a fraction of the time it took to find it.

Prices and features are from 21st.dev’s own pricing page, help center and changelog at the time of writing. The component data comes from 21st.dev’s public component pages on the same day.

Ready to be the contractor customers find first?

Book a free strategy call. We'll go through your current site and your competitors and work out what would bring you more calls.

Free · Zoom, Google Meet, or phone · Reply within one business day