shadcn/ui Icons: Lucide, 5 Alternatives and How to Switch

shadcn/ui uses Lucide by default, set by iconLibrary in components.json. We ran shadcn migrate icons to 5 other libraries: coverage, type errors, bundle size.

Amit Yadav
13 min read
On this page

shadcn/ui uses Lucide by default. The iconLibrary field in components.json sets the library, and shadcn migrate icons moves your components to Tabler, Hugeicons, Phosphor, Remix Icon or Radix Icons.

We tested all five on a fresh project on 2026-11-05, with every component added. Four moved cleanly, two of those needed one small type fix, and Radix left icons behind.

Key takeaways

  • Keep Lucide unless you have a reason to leave. It is the default, needs no setup, and every shadcn example assumes it.
  • Best Lucide alternative: Tabler. It has the same 24px grid and 2px stroke, three times the icons, and migrated with no skipped icons and no type errors.
  • Switching is one command, because the shadcn components use only 17 distinct icons. Run the migrate command, then check the spinner and the toast.
  • Avoid moving to Radix Icons. shadcn calls it legacy, 5 of the 17 icons have no match, and the config still changes to Radix.
  • Check the license before picking Remix Icon. Version 4.9.0, the one migrate installs, bans use of its icons as a logo.

Which icon library does shadcn/ui use?

Lucide. A new project created with shadcn init writes this to components.json:

{
  "style": "base-nova",
  "iconLibrary": "lucide"
}

Every component you add then imports from lucide-react. The code lives in your project, so shadcn/ui and Lucide stay separate things: shadcn/ui is the component code, Lucide is the icon package that code imports.

The old new-york style used Radix Icons until November 2024, when the shadcn changelog records its move to Lucide. Older projects can still import @radix-ui/react-icons, and how to move them is below.

The dependency is smaller than it looks. We added all components to a Vite project with shadcn 4.23.0. Of 63 files in src/components/ui, 24 import lucide-react, and they use only 17 distinct icons:

That is why switching is cheap. The icons in your own pages are a separate job, and we cover that in the switching section.

The 6 libraries at a glance

LibraryLicenseIcons (rounded)The 17 shadcn iconsType errors added
LucideISC2,000DefaultNone
TablerMIT6,30017 of 17None
PhosphorMIT1,500 in 6 weights17 of 17None
HugeiconsMIT6,10017 of 171 (spinner)
Remix IconCustom3,20017 of 171 (spinner)
Radix IconsMIT32012 of 171 (spinner)

The picture shows those 17 icons after the real migration. Compare across a column to see where a library swapped in a different idea.

The 17 icons used inside shadcn/ui, rendered in Lucide, Tabler, Hugeicons, Phosphor, Remix Icon and Radix Icons. Radix has 5 empty slots.

How to switch with shadcn migrate icons

Commit first, so you can read the diff. Then run:

pnpm dlx shadcn@latest migrate icons --from lucide --to tabler --yes

The command rewrites imports and JSX in your ui folder, installs the new package and updates iconLibrary, so later shadcn add runs use the new library. It accepts lucide, tabler, hugeicons, phosphor, remixicon and radix. The CLI docs list the options.

To try one component first, pass a path. A scoped run leaves components.json alone:

pnpm dlx shadcn@latest migrate icons src/components/ui/button.tsx --from lucide --to tabler

The command only touches the ui folder by default, so icons in your own pages keep importing Lucide. Keeping both packages is a fair choice if the styles match. Otherwise pass those files as a path or glob too.

What our test found

We ran each migration on a clean copy of the project, then ran the TypeScript compiler and rendered the result (shadcn 4.23.0, 2026-11-05). Three things are worth checking in your own project.

The spinner can fail your build. The stock Spinner spreads all SVG props onto the icon. After moving to Hugeicons, Remix Icon or Radix Icons, that line is a type error, and the Vite template runs tsc -b as part of build. Narrowing the props in spinner.tsx cleared it in all three:

function Spinner({ className, ...props }: { className?: string }) {

The stock project also has one error of its own, an unused React import in scroll-area.tsx. It appears with Lucide too, so migrating did not cause it.

Some icons change meaning. Coverage counts do not show this. These are the swaps the mapping made:

LibraryLucide iconBecomesWhat changes
TablerCircleCheckIconCircleCheckFilledSolid, not outline
TablerOctagonXIconAlertOctagonShows ! instead of X
Remix IconCircleCheckRiCheckboxCircleFillSolid, not outline
Remix IconTriangleAlertRiErrorWarningLineA circle, not a triangle
HugeiconsInfoAlertCircleIconShows ! instead of i
HugeiconsArrowDownArrowDownIconDraws a chevron, not an arrow
PhosphorMoreHorizontalDotsThreeOutlineIconHollow dots
Radix IconsLoader2ReloadIconA reload arrow spins as the loader

Most show up in the toast, so open one of each toast type after migrating.

Radix does not finish, and still changes the config. Five icons had no match: ArrowDown, CircleCheck, Info, TriangleAlert and OctagonX. The command reports them and leaves them alone, so 2 files kept importing lucide-react. It still set iconLibrary to radix and exited with code 0, so a script will not notice.

Size and visual weight

We bundled the same 17 icons with esbuild and measured how much of the box each set fills at 16px, the size shadcn buttons use.

LibraryBundle, gzipInk at 16px
Tabler1.9 KB11.8%
Remix Icon2.0 KB11.2%
Hugeicons (with its wrapper)2.2 KB12.8%
Radix Icons (12 icons only)2.5 KB11.0%
Lucide3.1 KB12.7%
Phosphor7.0 KB10.1%

Ink is measured on the 12 icons all six share. Nobody will notice a 5 KB difference, but the weight difference is visible: Phosphor's regular weight reads about 20% lighter than Lucide, while Hugeicons is the closest match. These figures are for shadcn's own icons only, and your total depends on how many more you import.

The libraries, one by one

Versions and licenses are from npm on 2026-11-05.

01

Lucide

LicenseISC

The default, and the right choice for most projects. lucide-react 1.68.0 shipped the day before our test, so it is under active work. It has a 24px grid and a 2px stroke, and every shadcn example and block assumes it.

import { ChevronDownIcon } from "lucide-react";

<ChevronDownIcon className="size-4 opacity-50" />

Leave it when you keep missing icons. Its 2,000 is about a third of Tabler or Hugeicons.

02

Tabler

LicenseMIT

The best Lucide alternative for shadcn. The grid and stroke are the same, it has three times the icons, and it came through our test with nothing skipped and no type errors. Its gzip size was also the smallest. @tabler/icons-react 3.50.0 was released in October 2026.

import { IconChevronDown } from "@tabler/icons-react";

<IconChevronDown className="size-4 opacity-50" stroke={1.5} />

Our Tabler vs Lucide comparison covers the differences in detail.

03

Phosphor

LicenseMIT

Pick Phosphor when you want weights: 1,500 icons in thin, light, regular, bold, fill and duotone. A bold or fill icon for an active nav item needs no second library.

import { CaretDownIcon } from "@phosphor-icons/react";

<CaretDownIcon weight="bold" className="size-4 opacity-50" />

Three limits. It looks lighter than Lucide at 16px, so weight="bold" may suit small sizes better. Its gzip size was the largest in our test. And @phosphor-icons/react 2.1.10 dates from May 2025, the oldest release here. Migrate also adds strokeWidth={2} to each icon, which does nothing visible because Phosphor icons are filled paths. More in Phosphor vs Lucide.

04

Hugeicons

LicenseMIT

The closest visual weight to Lucide, with a large free set. It works differently from the others: the icons are data, and a wrapper component renders them, so you install two packages.

import { HugeiconsIcon } from "@hugeicons/react";
import { ArrowDown01Icon } from "@hugeicons/core-free-icons";

<HugeiconsIcon icon={ArrowDown01Icon} strokeWidth={2} className="size-4" />

Names are harder to guess: ChevronDown is ArrowDown01Icon and X is Cancel01Icon. We hold 6,100 of its free icons, while core-free-icons 4.4.0 exports 14,890 names. We did not check how many of those are aliases. Hugeicons also sells a paid set, so check that an icon you find on its site is in the free package.

05

Remix Icon

LicenseRemix Icon License 1.0

A clean set with outline and fill versions of most icons, and the size and coverage are fine. The catch is the license. Migrate installs @remixicon/react 4.9.0, and from that version the license bans using the icons as a logo, while 4.8.0 and older stay under Apache 2.0.

import { RiArrowDownSLine } from "@remixicon/react";

<RiArrowDownSLine className="size-4 opacity-50" />

Fine for UI icons. If your users could use an icon as a logo, read what the license change means first.

06

Radix Icons

LicenseMIT

Do not start here. shadcn's source calls Radix legacy and does not offer it to new projects. Its mapping table covers 37 of 192 icons, against 187 for each of the other four. The set is 320 icons on a 15x15 grid, so you will need a second library for page content anyway.

import { ChevronDownIcon } from "@radix-ui/react-icons";

<ChevronDownIcon className="size-4 opacity-50" />

Radix Icons default to 15x15, not 24x24, so set the size with a class outside shadcn components. Inside a Button the size is set for you.

Older project still on Radix Icons?

Projects from the old new-york style may import @radix-ui/react-icons inside src/components/ui. The same command moves them to Lucide:

pnpm dlx shadcn@latest migrate icons --from radix --to lucide --yes

In our test this removed every Radix import and set iconLibrary to lucide. Our test files had been generated by the migrate command, so an old project can hold icons it does not map (such as DotFilledIcon). Read the skipped list it prints and swap those by hand.

Sizing icons inside shadcn components

The shadcn Button sets a size on any SVG inside it that has no size class of its own:

[&_svg:not([class*='size-'])]:size-4

So library defaults such as Phosphor's 1em or Radix's 15px do not matter inside a button, and the icon renders at 16px. To override it, give the icon a size-* class. h-4 w-4 will not match that selector, so the rule will still apply.

Add data-icon="inline-start" or data-icon="inline-end" to an icon next to button text, and the button adjusts its padding on that side. Outside a button, set the size yourself.

Icons take the text color through currentColor, so use text-* classes for color. The stock spinner has role="status" and aria-label="Loading". For an icon-only button, name the button, not the icon: accessible SVG icons has the patterns and our screen reader tree tests.

Need only a few icons? Install them one at a time

You can skip the npm package. All SVG Icons serves every icon as a shadcn registry item, so the CLI can add a single one:

pnpm dlx shadcn@latest add https://i.allsvgicons.com/r/lucide:plus.json

Swap lucide:plus for any pack:icon name, such as tabler:chevron-down or ph:caret-down. To shorten the command, register a namespace in components.json:

{
  "registries": {
    "@allsvgicons": "https://i.allsvgicons.com/r/{name}.json"
  }
}
pnpm dlx shadcn@latest add @allsvgicons/lucide:alarm-clock

We ran both on 2026-11-05. The icon lands as an SVG file, src/assets/icons/lucide/alarm-clock.svg, not as a React component. It uses currentColor and a 1em size, so inline it or load it through your bundler's SVG handling when you want text-* classes to apply. This is our own service, so weigh it as such: an npm package is simpler when you need dozens of icons.

A coding agent can do the search for you through the All SVG Icons MCP server. Describe the icon, and it finds a match across packs and inserts the SVG.

Frequently asked questions

What icons does shadcn/ui use?
Lucide, through the lucide-react package. New projects get iconLibrary set to lucide in components.json. The components themselves use only 17 distinct icons, such as check, chevrons, X and search.
Is shadcn the same as Lucide?
No. shadcn/ui is a set of components you copy into your project, and Lucide is a separate icon library those components import. You can replace Lucide and keep every shadcn component.
What is the best Lucide alternative for shadcn/ui?
Tabler for most projects. It has the same 24px grid and 2px stroke with three times the icons, and in our test it migrated with nothing skipped and no type errors. Pick Phosphor if you need several weights of each icon.
Can I change the icon library after creating a project?
Yes. Run shadcn migrate icons with the from and to libraries. It rewrites your ui folder, installs the new package and updates iconLibrary. The style and base color are the fields you cannot change after init, not the icons.
Can I use two icon libraries in one shadcn project?
Yes. A common setup keeps Lucide in the shadcn components and adds a larger set for page content. Both packages tree-shake, so the cost is small. Pick two sets with a similar stroke so they do not clash when side by side.
Does shadcn/ui still support Radix Icons?
Only as a legacy option. The migrate command can still move to or from Radix Icons, but new projects are not offered it, and 5 of the 17 icons used by the components have no match. Note that Radix UI primitives are a separate thing from Radix Icons.

Related posts

Share this post