These eight npm packages provide icon solutions for web development, each with distinct approaches to delivery, customization, and framework integration. bootstrap-icons, feather-icons, heroicons, and octicons focus on SVG-based rendering with minimal dependencies. font-awesome and line-awesome offer both font and SVG options with extensive icon collections. material-icons follows Google's Material Design specification, while ionicons targets cross-platform applications with Ionic framework integration. All packages serve the core purpose of adding visual icons to interfaces, but they differ significantly in licensing, customization capabilities, and ecosystem support.
When building modern web applications, icons serve as visual anchors that guide users through interfaces. The eight packages we're comparing — bootstrap-icons, feather-icons, font-awesome, heroicons, ionicons, line-awesome, material-icons, and octicons — all solve this problem, but they take different approaches to delivery, customization, and ecosystem integration. Let's examine how each handles common development scenarios.
Different packages offer different ways to get icons into your project. Some load from CDN, others bundle with your build, and a few offer both options.
bootstrap-icons installs via npm and offers multiple import methods.
npm install bootstrap-icons
// Import individual SVG
import { Person, House } from 'bootstrap-icons';
// Or use CSS classes with font files
<link rel="stylesheet" href="/bootstrap-icons.css">
<i class="bi bi-person"></i>
feather-icons loads icons dynamically through JavaScript.
npm install feather-icons
import feather from 'feather-icons';
// Replace all <i data-feather> elements
feather.replace();
// Or get specific icon SVG
feather.icons['shopping-cart'].toSvg();
font-awesome offers multiple package options depending on your needs.
npm install @fortawesome/fontawesome-svg-core
npm install @fortawesome/free-solid-svg-icons
npm install @fortawesome/react-fontawesome
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCoffee } from '@fortawesome/free-solid-svg-icons';
<FontAwesomeIcon icon={faCoffee} />
heroicons provides React and Vue components plus raw SVGs.
npm install @heroicons/react
import { BeakerIcon } from '@heroicons/react/24/solid';
<BeakerIcon className="h-6 w-6" />
ionicons works as web components or framework-specific packages.
npm install ionicons
import { addIcons } from 'ionicons';
import { home, settings } from 'ionicons/icons';
addIcons({ home, settings });
// In template
<ion-icon name="home"></ion-icon>
line-awesome uses CSS classes similar to Font Awesome.
npm install line-awesome
<link rel="stylesheet" href="line-awesome/css/line-awesome.min.css">
<i class="las la-coffee"></i>
material-icons loads from Google's CDN or npm package.
npm install material-icons
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<span class="material-icons">search</span>
octicons provides React components and raw SVGs.
npm install @primer/octicons-react
import { MarkGithubIcon } from '@primer/octicons-react';
<MarkGithubIcon size={24} />
How you change icon color, size, and appearance varies significantly between packages.
bootstrap-icons uses CSS properties for styling.
.bi-person {
width: 2rem;
height: 2rem;
fill: currentColor;
color: #0d6efd;
}
<i class="bi bi-person" style="font-size: 2rem; color: blue;"></i>
feather-icons accepts attributes during SVG generation.
feather.icons['user'].toSvg({
class: 'icon',
width: 24,
height: 24,
stroke: '#333'
});
font-awesome uses props for React components or CSS classes.
<FontAwesomeIcon
icon={faUser}
size="2x"
color="#333"
rotation={90}
/>
<i class="fas fa-user fa-2x" style="color: #333;"></i>
heroicons passes standard SVG props through components.
<BeakerIcon
className="h-6 w-6 text-blue-500"
strokeWidth={2}
/>
ionicons uses component props for styling.
<ion-icon
name="home"
size="large"
color="primary"
style={{ fontSize: '24px' }}
></ion-icon>
line-awesome relies on CSS classes and properties.
<i class="las la-user la-2x" style="color: #333;"></i>
.la-user {
font-size: 2rem;
color: #0d6efd;
}
material-icons uses CSS classes or ligature text.
<span class="material-icons" style="font-size: 48px; color: red;">favorite</span>
.material-icons {
font-size: 24px;
color: #1976d2;
}
octicons accepts size and fill props.
<MarkGithubIcon
size={32}
fill="#24292e"
className="custom-class"
/>
Each package handles React, Vue, and other frameworks differently.
bootstrap-icons works as plain HTML or with framework wrappers.
// React example
function Icon() {
return <i className="bi bi-heart-fill"></i>;
}
feather-icons requires manual initialization in framework lifecycle.
// React useEffect
useEffect(() => {
feather.replace();
}, []);
return <i data-feather="home"></i>;
font-awesome has official components for major frameworks.
// React
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
// Vue
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
heroicons offers separate packages for React and Vue.
// React
import { StarIcon } from '@heroicons/react/24/outline';
// Vue
import { StarIcon } from '@heroicons/vue/24/outline';
ionicons provides framework-specific bindings.
// React
import { IonIcon } from '@ionic/react';
// Vue
import { IonIcon } from '@ionic/vue';
line-awesome works as plain CSS without framework dependencies.
// Works in any framework
return <i className="las la-star"></i>;
material-icons functions as web fonts or React components.
// React component
import { Icon } from '@material-ui/core';
<Icon>star</Icon>
octicons has React and Vue packages.
// React
import { GitPullRequestIcon } from '@primer/octicons-react';
// Vue
import { GitPullRequestIcon } from '@primer/octicons-vue';
How icons load affects your application's initial paint time and runtime performance.
bootstrap-icons allows tree-shaking when importing individual icons.
// Bundle only what you use
import { PersonIcon } from 'bootstrap-icons';
// vs loading entire sprite
feather-icons loads all icons in the initial bundle by default.
// Entire icon set loads
import feather from 'feather-icons';
// Can optimize with individual imports
import { toSvg } from 'feather-icons';
font-awesome supports subsetting to reduce bundle size.
// Import only needed icons
import { faUser } from '@fortawesome/free-solid-svg-icons';
// Or use icon packs
import { fas } from '@fortawesome/free-solid-svg-icons';
heroicons imports are tree-shakeable by default.
// Only BeakerIcon bundles
import { BeakerIcon } from '@heroicons/react/24/solid';
ionicons loads icons on-demand when referenced.
// Icons load when first used
import { addIcons } from 'ionicons';
import { home } from 'ionicons/icons';
addIcons({ home });
line-awesome loads as CSS font file.
/* Single font file contains all icons */
@import 'line-awesome/css/line-awesome.min.css';
material-icons can load from Google Fonts CDN.
<!-- Loads on demand from Google -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
octicons supports individual icon imports.
// Tree-shakeable imports
import { SearchIcon } from '@primer/octicons-react';
License terms affect which packages you can use in commercial projects.
bootstrap-icons uses MIT license — free for commercial use.
MIT License
- Commercial use: ✅ Allowed
- Modification: ✅ Allowed
- Distribution: ✅ Allowed
- Private use: ✅ Allowed
feather-icons uses MIT license — free for commercial use.
MIT License
- No attribution required
- Unlimited projects
font-awesome has dual licensing (Free + Pro).
Free: CC BY 4.0 (attribution required)
Pro: Commercial license (paid)
- Free tier: 2,000+ icons
- Pro tier: 16,000+ icons
heroicons uses MIT license — free for commercial use.
MIT License
- Created by Tailwind CSS team
- No restrictions on commercial projects
ionicons uses MIT license — free for commercial use.
MIT License
- Maintained by Ionic team
- Free for all projects
line-awesome uses MIT license — free for commercial use.
MIT License
- Font Awesome alternative
- No licensing concerns
material-icons uses Apache 2.0 license — free for commercial use.
Apache 2.0 License
- Google maintained
- Commercial use allowed
- Patent grant included
octicons uses MIT license — free for commercial use.
MIT License
- GitHub maintained
- Free for all projects
You're building an admin panel with navigation, actions, and status indicators.
bootstrap-icons or font-awesome// bootstrap-icons example
<nav>
<i className="bi bi-house-door"></i> Dashboard
<i className="bi bi-people"></i> Users
<i className="bi bi-gear"></i> Settings
</nav>
You want clean, minimalist icons for a design-focused product.
heroicons or feather-icons// heroicons example
<button>
<PlusIcon className="h-5 w-5" />
Add Item
</button>
You need icons that work across web and mobile platforms.
ionicons// ionicons example
<ion-tab-bar>
<ion-tab-button>
<ion-icon name="home"></ion-icon>
</ion-tab-button>
</ion-tab-bar>
You're building GitHub integrations or technical documentation.
octicons// octicons example
<RepoIcon /> <IssueOpenedIcon /> <PullRequestIcon />
You're following Google's Material Design guidelines.
material-icons// material-icons example
<span className="material-icons">add_circle</span>
You're moving from Font Awesome but want to avoid licensing issues.
line-awesome<!-- Similar to Font Awesome syntax -->
<i class="las la-user"></i>
Each package has trade-offs you should understand before committing.
bootstrap-icons: Tied to Bootstrap design language, may not match custom designs.
feather-icons: Limited icon count (~280 icons), all icons must load initially.
font-awesome: Free version requires attribution, pro features need paid license.
heroicons: Smaller icon set compared to competitors, React/Vue focused.
ionicons: Larger bundle size, web component overhead for simple projects.
line-awesome: Less actively maintained than Font Awesome, smaller community.
material-icons: Google-dependent CDN, may not match non-Material designs.
octicons: GitHub-focused icon set, may lack general-purpose icons.
| Package | License | Icon Count | SVG Support | Font Support | React | Vue | Angular |
|---|---|---|---|---|---|---|---|
bootstrap-icons | MIT | 2,000+ | ✅ | ✅ | ✅ | ✅ | ✅ |
feather-icons | MIT | ~280 | ✅ | ❌ | ✅ | ✅ | ✅ |
font-awesome | CC BY 4.0 / Pro | 2,000+ / 16,000+ | ✅ | ✅ | ✅ | ✅ | ✅ |
heroicons | MIT | ~500 | ✅ | ❌ | ✅ | ✅ | ❌ |
ionicons | MIT | 1,300+ | ✅ | ✅ | ✅ | ✅ | ✅ |
line-awesome | MIT | 1,500+ | ✅ | ✅ | ✅ | ✅ | ✅ |
material-icons | Apache 2.0 | 2,500+ | ✅ | ✅ | ✅ | ✅ | ✅ |
octicons | MIT | ~400 | ✅ | ❌ | ✅ | ✅ | ❌ |
Think about your project's specific needs before choosing:
For maximum icon variety: font-awesome offers the largest collection, but consider licensing for commercial projects.
For design consistency: heroicons and feather-icons provide the most visually cohesive sets.
For framework integration: All packages support major frameworks, but heroicons and octicons have the cleanest React/Vue components.
For mobile applications: ionicons is purpose-built for cross-platform mobile experiences.
For Material Design: material-icons is the official choice with Google's backing.
For GitHub projects: octicons matches GitHub's visual language perfectly.
For free alternatives: bootstrap-icons, line-awesome, and heroicons offer MIT licensing without attribution requirements.
For legacy projects: font-awesome and line-awesome have the most documentation and community support.
All eight packages will add icons to your application successfully. The real question isn't which is "best" — it's which fits your specific constraints around design system, licensing, bundle size, and framework choice.
Start with these questions:
Answer these honestly, and the right choice becomes clear. For most modern web applications starting today, heroicons (Tailwind projects), bootstrap-icons (Bootstrap projects), or feather-icons (design-focused projects) provide the best balance of quality, licensing, and ease of use.
Choose bootstrap-icons if you're already using Bootstrap in your project or need a free, open-source icon set with over 2,000 icons. It works well for admin dashboards, content management systems, and general web applications. The SVG-based approach means no font loading issues, and it integrates smoothly with Bootstrap components. Best for teams wanting consistent styling without complex setup.
Choose feather-icons if you prioritize clean, minimalist design with consistently styled icons. All icons share the same stroke width and visual weight, making them ideal for modern SaaS applications and design-focused projects. The package is lightweight and simple to implement. Best for projects where visual consistency matters more than icon variety.
Choose font-awesome if you need the largest icon collection (over 2,000 free icons, 16,000+ pro) and don't mind licensing considerations for premium icons. It offers both font and SVG implementations with extensive framework support. Best for enterprise applications, legacy projects, or teams needing maximum icon variety with established documentation.
Choose heroicons if you're building with Tailwind CSS or want hand-crafted SVG icons designed by the Tailwind creators. The icons come in outline and solid variants, perfect for modern web applications. Best for projects already using Tailwind or teams prioritizing design quality over icon quantity.
Choose ionicons if you're building cross-platform applications with Ionic Framework or need icons that work consistently across web, iOS, and Android. Offers over 1,300 icons with automatic platform-specific styling. Best for mobile-first applications, PWAs, or hybrid app development.
Choose line-awesome if you need a free alternative to Font Awesome with similar icon naming and structure. It's essentially Font Awesome's icon set converted to pure CSS/SVG without licensing restrictions. Best for teams migrating from Font Awesome Free or needing familiar icon names without pro licensing concerns.
Choose material-icons if you're following Google's Material Design guidelines or building Android-style interfaces. The icons are officially maintained by Google with consistent naming and regular updates. Best for Material Design projects, Android web apps, or teams wanting Google's design system integration.
Choose octicons if you're building developer tools, GitHub integrations, or want icons designed specifically for software interfaces. Created by GitHub, these icons work well for documentation sites, dashboards, and technical applications. Best for developer-focused products or projects needing GitHub-style visual language.
Official open source SVG icon library for Bootstrap with over 2,000 icons.
Explore Bootstrap Icons »
Bootstrap
·
Themes
·
Blog
Bootstrap Icons are packaged up and published to npm. We only include the processed SVGs in this package—it's up to you and your team to implement. Read our docs for usage instructions.
npm i bootstrap-icons
For those using Packagist, you can also install Bootstrap Icons via Composer:
composer require twbs/bootstrap-icons
Depending on your setup, you can include Bootstrap Icons in a handful of ways.
<img> elementSee the docs for more information.
Clone the repo, install dependencies, and start the Hugo server locally.
git clone https://github.com/twbs/icons/
cd icons
npm i
npm start
Then open http://localhost:4000 in your browser.
Here are some key scripts you'll use during development. Be sure to look to our package.json or npm run output for a complete list of scripts.
| Script | Description |
|---|---|
start | Alias for running docs-serve |
docs-serve | Starts a local Hugo server |
pages | Generates permalink pages for each icon with template Markdown |
icons | Processes and optimizes SVGs in icons directory, generates fonts and sprite |
Icons are typically only added by @mdo, but exceptions can be made. New glyphs are designed in Figma first on a 16x16px grid, then exported as flattened SVGs with fill (no stroke). Once a new SVG icon has been added to the icons directory, we use an npm script to:
Use npm run icons to run the script, run npm run pages to build permalink pages, complete those pages, and, finally, commit the results in a new branch for updating.
Warning: Please exclude any auto-generated files, like font/** and bootstrap-icons.svg from your branch because they cause conflicts, and we generally update the dist files before a release.
Documentation is published automatically when a new Git tag is published. See our GitHub Actions and package.json for more information.