Overview

Short answer: use shadcn/ui, built on Base UI or Radix, for most of your app. Add Sonner for toasts, Vaul for drawers, cmdk for command menus and NumberFlow for changing numbers, because those are the components AI gets wrong when it builds them itself. Then pull one designed component per page from Beautiful UI, RareUI, Magic UI, Aceternity or 21st.dev.

One of the easiest ways to make AI-built UI look better is to stop letting the model build every component from scratch. Ask for a toast, a command menu or a loading state and it writes a new one with default styling every time. It doesn't know how a toast should stack, or how a drawer should feel when you drag it. A component library hands the model someone else's taste, and each kind of library does a different job.

The three kinds of UI component library

  • Foundations (shadcn/ui, Base UI, Radix) give you the behavior of a component: keyboard navigation, focus and accessibility. You do the styling. Use them for most of your app.
  • Specialists (Sonner, Vaul, cmdk, NumberFlow) each do one component really well. Use them for the details that make a product feel finished.
  • Designed components (Beautiful UI, RareUI, Magic UI, Aceternity, 21st.dev) are finished, styled pieces you copy into your project. Use them for the moments you want people to notice.

The kinds stack: shadcn/ui for buttons, inputs, dialogs, dropdowns and tabs, Sonner for notifications, and one animated section from a designed library on the landing page.

Foundations: shadcn/ui, Base UI and Radix

shadcn/ui

shadcn/ui describes itself as "not a component library" but a way to build your own. Its CLI copies each component's code into your project instead of hiding it in an npm package, so you own the code and Claude can read and change all of it. The docs let you build each component on Base UI or Radix underneath.

One thing to watch for: default shadcn has become an AI look of its own. If you have used Claude Code or Lovable enough, you can spot it right away: the same radius, the same gray, the same font. Treat it as a starting point and change the radius, the colors and the type so it looks like your product. Those three carry most of the personality. A tighter radius and a serif heading can make the same components feel like an editorial product instead of a SaaS template, and Claude is good at this if you give it your brand colors and fonts up front.

Base UI

Base UI is a library of unstyled React components for building accessible interfaces, from the creators of Radix, Floating UI and Material UI. It handles behavior and accessibility and leaves every visual decision to you, which makes it a clean base for a design system that should not look like anyone else's.

Radix Primitives

Radix Primitives are unstyled, accessible, open source React primitives, made by WorkOS. Each one documents its keyboard and focus behavior: the Dialog has modal and non-modal modes with fine-grained focus control, and the Dropdown Menu supports submenus, arrow key navigation and typeahead.

shadcn/ui homepage reading The Foundation for your Design System above example cards with buttons, a contribution chart, a milestone form and a QR code card
shadcn/ui's homepage. The components land in your project as code you can edit. Screenshot from ui.shadcn.com.
Base UI Popover docs with an open Notifications popover reading You are all caught up, above the component's anatomy code
Base UI's Popover, unstyled by default. Screenshot from base-ui.com.
Radix Primitives homepage reading Core building blocks for your design system with Dialog, Dropdown Menu and Popover previews
Radix Primitives. Screenshot from radix-ui.com.

Specialists: Sonner, Vaul, cmdk and NumberFlow

Sonner for toasts

Sonner is an opinionated toast component for React, made by Emil Kowalski. It handles how toasts stack, how the stack expands when you hover it, and how each toast animates in and out. You render one <Toaster /> at the root of your app and call toast() anywhere. It installs with npm install sonner.

Vaul for drawers

Vaul is a drawer component for React, also by Emil Kowalski: the kind you drag up from the bottom on mobile and flick down to close. Install it with pnpm i vaul.

cmdk for command menus

cmdk is a fast, unstyled command menu component for React, the search box you open with ⌘K. You render items and it filters and sorts them, and it also works as an accessible combobox. Its old site, cmdk.paco.me, now redirects to the GitHub repo at github.com/dip/cmdk. shadcn/ui's Command component is built on it, so if you use shadcn you may already have it.

NumberFlow for animated numbers

NumberFlow animates a number when its value changes, so a price or a count ticks over instead of jumping. Its site calls it dependency-free, accessible and customizable, and it takes standard Intl.NumberFormat options for currencies, percentages and compact notation.

You usually notice these components when they're missing. When AI builds toasts itself, they tend to pile on top of each other or vanish before you can read them. A hand-built drawer often won't drag at all; it opens and closes. A homemade command menu usually breaks the moment you use it with the keyboard. None of these are big features, but they are the details that make a product feel finished, and they are exactly the details AI skips when it builds from scratch.

Sonner demo site with three toasts stacked in the bottom right corner, expanded on hover
Sonner's toast stack, expanded on hover. Screenshot from sonner.emilkowal.ski.
shadcn/ui Command component docs with the menu filtered to Calculator and Calendar after typing cal
shadcn's Command menu, built on cmdk, filtering as you type. Screenshot from ui.shadcn.com.
NumberFlow homepage showing the number 42 mid-animation with a Shuffle button and basic usage code
NumberFlow rolls each digit to the new value. Screenshot from number-flow.barvian.me.

The pick-ui-library skill

Emil Kowalski also publishes a Claude skill called pick-ui-library. When you invoke it with a task ("I need toasts", "what should I use for drag and drop?"), it matches the task to his curated list and recommends one library with one sentence on why, instead of a menu of options. The list includes Base UI for accessible primitives, cmdk for command menus, Sonner for toasts, input-otp for verification codes, motion for animation and NumberFlow for animated numbers.

The part I like most is its list of common mismatches to catch: toasts built by hand point to Sonner, a div-based dropdown with manual focus handling points to Base UI, and a number animated by re-rendering text points to NumberFlow. It also checks your package.json first and keeps a library you already use.

One detail worth knowing: the skill's frontmatter sets disable-model-invocation: true, so it only runs when you call it. It will not step in on its own when Claude starts building a toast system. Invoke it at the start of a feature, or put the same picks in your project instructions. New to skills? Here is how they work and which ones I use: Claude Skills for Designers

GitHub page for the pick-ui-library SKILL.md showing tables of tasks and libraries for UI components and motion
The curated list inside pick-ui-library. Screenshot from github.com/emilkowalski/skills.

Designed components: Beautiful UI, RareUI, Magic UI, Aceternity and 21st.dev

Beautiful UI, for AI products

If you are building an AI product, Beautiful UI is the one I would look at first. It is built by Turbo, a product design studio, specifically for AI-native interfaces: loading and thinking states, streaming text with inline sources, approval cards for when an agent needs permission, tool chips, task rows, a diff table and an agent screen. Most component libraries were made before AI products existed, so they don't cover these states yet. Each component has a Copy code button on the site.

RareUI, for flashy moments

RareUI is a free React library for the flashy moments: animated buttons, text effects and interactive backgrounds. You install a component with one command (pnpm dlx rareui add liquid-button) and the code lands in your project so you can edit it.

Magic UI, on top of shadcn

Magic UI has 150+ free and open source animated components and effects built with React, TypeScript, Tailwind CSS and Motion, and calls itself a companion for shadcn/ui. It fits right into the foundation above.

Aceternity UI, for landing pages

Aceternity is the one for landing page effects: 3D cards, background beams, carousels and marquees. You can install its components with the shadcn CLI (for example npx shadcn@latest add @aceternity/3d-card-demo) or have your coding agent add them.

21st.dev, the marketplace

21st.dev is a marketplace rather than one library: 12,000+ React components, templates and shadcn themes published by many design engineers. Every component ships as a prompt you paste into Claude Code, Codex or Lovable. It is the place to look when you need something specific and don't want to commit to one library. I made a full video on using it with Claude Code: Watch on YouTube

With this whole group, keep one rule in mind: one showpiece moment per page. One animated hero or one interactive background makes a page feel designed. Ten on the same page is how you get the next AI-generated look, where everything glows and moves and nothing stands out.

Beautiful UI site in dark mode showing an Approval Card asking how many flavors to launch, above a Tool Chips component listing code edits
Beautiful UI's Approval Card and Tool Chips, two states most libraries don't have. Screenshot from beautifului.dev.
RareUI component grid with animated buttons and text effects including Hover me, Premium, Smoke Effect and Magnet Effect
RareUI's animated components. Screenshot from rareui.in.
Aceternity UI free animated components including 3D Card Effect, Apple Cards Carousel and Background Beams
Aceternity's free animated components. Screenshot from ui.aceternity.com.
Magic UI homepage reading UI library for Design Engineers, 150+ free and open-source animated components, perfect companion for shadcn/ui
Magic UI. Screenshot from magicui.design.
21st.dev homepage reading The living library of interfaces with rows of hero and background component cards
21st.dev. Screenshot from 21st.dev.

React UI library comparison table

LibraryKindUse it forHow you add it
shadcn/uiFoundationMost app components, as code you ownCLI copies code into your project
Base UIFoundation, unstyledAccessible primitives for your own design systemnpm package
Radix PrimitivesFoundation, unstyledAccessible primitives for your own design systemnpm package
SonnerSpecialistToasts and notificationsnpm install sonner
VaulSpecialistDrawers and mobile bottom sheetspnpm i vaul
cmdkSpecialist⌘K command menus and comboboxespnpm install cmdk
NumberFlowSpecialistPrices, counts and stats that change@number-flow/react
Beautiful UIDesignedAI product states: streaming, approvals, agent screensCopy code from the site
RareUIDesignedAnimated buttons and text effectsrareui add CLI
Magic UIDesignedAnimated sections next to shadcn/uiPer-component docs
Aceternity UIDesignedLanding page effectsshadcn CLI or your agent
21st.devMarketplaceOne specific component from many authorsPaste a prompt into your agent

How to get Claude to use a component library

  1. 01Name the library in your promptSay "use shadcn for the base components and Sonner for toasts" and it will.
  2. 02Install through the CLI or registryThe code then lives in your project, so Claude can read it and you can change it.
  3. 03Give it your brand up frontColors, fonts and radius, so the defaults stop looking like every other AI app.
  4. 04Let pick-ui-library chooseInvoke the skill when you start a feature and don't want to think about which library fits.

If you name the same libraries in every prompt, put them in your project instructions instead, so the agent reads them on every task: How to Write an AGENTS.md File for Design Projects For the rest of the prompt, my approach to briefing AI on UI work is here: How to Prompt AI for Better UI Design

Libraries fix components; references fix layouts. For real product screens to design from, these are the reference sites I use alongside these libraries: Stop Letting AI Design From Scratch: 5 UI Reference Sites

FAQ

For most apps, shadcn/ui on top of Base UI or Radix, because it gives you accessible behavior and copies the code into your project where you and your AI agent can change it. Add specialists like Sonner, Vaul, cmdk and NumberFlow for the components that are hard to get right.

By its own description, no. shadcn/ui calls itself a way to build your own component library: its CLI copies each component's source into your project instead of installing a package you import.

Both are unstyled, accessible React component libraries. Base UI comes from the creators of Radix, Floating UI and Material UI; Radix Primitives is made by WorkOS. shadcn/ui can use either one underneath.

Beautiful UI, built by Turbo. It covers states older libraries skip: thinking and loading states, streaming text, approval cards for agent permissions, tool chips, diff tables and agent screens.

Change the radius, the colors and the type before anything else, and give Claude your brand colors and fonts up front. Then add one designed component per page, not ten.

No. Its frontmatter sets disable-model-invocation to true, so it only runs when you invoke it. When you do, it recommends one library from Emil Kowalski's curated list with a one-sentence reason.

Continue reading

Stop Letting AI Design From Scratch: 5 UI Reference SitesAI Design Tools for Designers (2026): The Complete Guide