home/use-cases/icons-for-nextjs-app-router
// USE CASE

Icons for Next.js App Router

The Next.js App Router introduced Server Components which changed how frontend libraries must be built. Icon libraries that use React context, browser APIs, or client-side state break in Server Components. This page covers only icon libraries that are verified to work correctly in Next.js App Router without any special configuration or use client directives.

nextjs app router iconsicons next.js 14server component iconsnext.js icon library 2026

WHY THIS MATTERS

//Using an incompatible icon library with Next.js App Router causes runtime errors that are difficult to debug. The error messages are often cryptic — "You cannot use useState in a Server Component" — when the real cause is an icon library that internally uses React hooks.

RECOMMENDED FOR ICONS FOR NEXT.JS APP ROUTER

★ TOP PICK

Lucide Icons

12,0001,400 iconsISC

A clean, consistent open-source icon library with 1400+ icons, forked from Feather Icons with active maintenance and TypeScript support.

npm install lucide-react
Full Guide →✓ TypeScript✓ Tree-shakable
#2

Heroicons

21,000292 iconsMIT

Beautiful hand-crafted SVG icons by the makers of Tailwind CSS. Available in outline and solid styles with 292 icons.

npm install @heroicons/react
Full Guide →✓ TypeScript✓ Tree-shakable
#3

Radix Icons

5,000318 iconsMIT

A crisp set of 15x15 icons designed by the WorkOS team. Perfectly sized for dense UIs and dashboards.

npm install @radix-ui/react-icons
Full Guide →✓ TypeScript✓ Tree-shakable

DESIGN TIPS

01

Always check if an icon library has specific Next.js App Router documentation before using it

02

Libraries that render pure SVG with no React hooks or context are always safe in Server Components

03

Lucide React, Heroicons, and Radix Icons are all confirmed Server Component compatible

04

If you must use a non-compatible library, wrap it in a Client Component with use client

05

Test icon rendering in both Server and Client Components during development

MUST-HAVE ICONS FOR THIS USE CASE

homearrow-rightcheckxmenusearchusersettingsbellchevron-downexternal-linkloader

COMMON MISTAKES TO AVOID

Using icon libraries that internally use useState or useContext

Not testing icons in actual Server Components before shipping

Wrapping every icon in use client when it is not necessary

Using icon font libraries like Font Awesome which require DOM manipulation

OTHER LIBRARIES TO CONSIDER

Tabler IconsMIT
5,500 icons
Phosphor IconsMIT
1,248 icons
Remix IconApache 2.0
2,800 icons
Feather IconsMIT
287 icons
Bootstrap IconsMIT
1,800 icons

BROWSE OTHER USE CASES

Icons for SaaS ProductsIcons for DashboardsIcons for Mobile AppsIcons for Landing PagesIcons for EcommerceIcons for Dark ModeIcons for Developer Tools