React SVG icons

Use free React SVG icons when you want a consistent interface without loading an entire icon set into every page. Devigner Icons exports each icon as its own React component, so a normal named import lets your bundler keep only what you use.

Install React icons

Terminal
npm install @devigner-ui/icons

Import only the icons your component renders:

TSX
import { IconArrowRight } from "@devigner-ui/icons/ArrowRight";
import { IconShoppingCart } from "@devigner-ui/icons/ShoppingCart";

export function CartLink() {
  return (
    <a href="/cart" className="inline-flex items-center gap-2">
      <IconShoppingCart className="size-5" />
      Cart
      <IconArrowRight className="size-4" />
    </a>
  );
}

Each icon has its own subpath, so even a dev server or a test runner that does not tree-shake loads only that icon. Named imports from the package root also work, and production bundlers drop what you do not use. Avoid namespace imports when bundle size matters.

Style an SVG icon

Icons use currentColor, so they follow the text colour of their parent. Size comes from CSS too, which keeps the component API small and predictable.

TSX
<IconShoppingCart className="size-6 text-slate-900" />
<IconShoppingCart variant="TwoTone" className="size-6 text-slate-900" />
<IconShoppingCart variant="Bold" className="size-6 text-slate-900" />
<IconShoppingCart variant="Broken" className="size-6 text-slate-900" />

Browse the full icon library, or start with shopping and e-commerce icons.

Make React icons accessible

An icon next to visible text is decorative. Keep it hidden from assistive technology so the label is announced once:

TSX
<button type="button" className="inline-flex items-center gap-2">
  <IconShoppingCart className="size-5" />
  Add to cart
</button>

When an icon is the only visible part of a control, name the control instead:

TSX
<button type="button" aria-label="Open cart">
  <IconShoppingCart className="size-5" />
</button>

For every prop and import path, read the React package page, the usage guide and the TypeScript reference.

Documentation

Browse all 12,480 icons