home/use-cases/tailwind-icons
// USE CASE

Icons for Tailwind CSS

Tailwind CSS has revolutionized styling by using utility classes. An ideal icon library for a Tailwind project must respect this paradigm. This means the icons should not have hardcoded fill or stroke colors; instead, they should use "currentColor" so they can be styled entirely via Tailwind text-* classes. Additionally, the sizing should be flexible enough to respond to w-* and h-* utility classes without breaking aspect ratios.

tailwind iconsicons for tailwind csstailwind svg iconsheroicons tailwind

WHY THIS MATTERS

//If an icon library does not support "currentColor", you will find yourself writing custom CSS overrides just to change an icon's hover state or dark mode appearance. Libraries built with Tailwind in mind allow you to control every aspect of the icon (size, color, opacity, transitions) using the exact same utility classes you use for your typography.

RECOMMENDED FOR ICONS FOR TAILWIND CSS

★ TOP PICK

Lucide Icons

12,0001,960 iconsISC

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

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

Heroicons

21,000324 iconsMIT

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

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

Tabler Icons

18,0006,147 iconsMIT

Over 6100 free MIT-licensed high-quality SVG icons. One of the largest free icon libraries available for web projects.

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

DESIGN TIPS

01

Use the text-* utility (e.g. text-blue-500) to colorize icons that use currentColor

02

Control icon sizing using standard w-* and h-* classes (e.g. w-6 h-6 for 24px)

03

Heroicons is built by the Tailwind CSS team and offers the best out-of-the-box integration

04

For complex hover states, use Tailwind group-hover on the parent button or link

MUST-HAVE ICONS FOR THIS USE CASE

checkxchevron-rightchevron-downarrow-rightexternal-link

COMMON MISTAKES TO AVOID

Using libraries with hard-coded colors that ignore Tailwind text classes

Adding custom CSS styles for icons instead of using Tailwind utilities

Not using w-full and h-full when wrapping icons in customized container divs

OTHER LIBRARIES TO CONSIDER

Phosphor IconsMIT
1,533 icons
Remix IconApache 2.0
3,229 icons
Feather IconsMIT
287 icons
Bootstrap IconsMIT
2,078 icons
Radix IconsMIT
318 icons
Font AwesomeMixed (CC BY 4.0 free icons, MIT code)
2,058 icons
React IconsMIT
52,000 icons
Material IconsMIT
2,100 icons
IconifyMIT (framework) — icon sets retain their original licenses
350,000 icons
Simple IconsCC0 1.0 (Public Domain)
3,200 icons
IconoirMIT
1,384 icons
IonIconsMIT
1,300 icons
OcticonsMIT
280 icons

BROWSE OTHER USE CASES

Icons for SaaS ProductsIcons for DashboardsIcons for Mobile AppsIcons for Landing PagesIcons for EcommerceIcons for Dark ModeIcons for Developer ToolsIcons for Next.js App RouterIcons for FormsIcons for NotificationsBest React Icon LibrariesBest Vue Icon Libraries

EXPLORE MORE

Framework Guides

Resources