Bootstrap Icons: Bootstrap, a widely-used CSS framework, simplifies the creation of responsive, mobile-first websites. With over 1800 icons, Bootstrap empowers you to customize your projects effortlessly.Â
The versatility of Bootstrap icons allows for seamless integration with or without Bootstrap, ensuring compatibility with any project. Additionally, Figma users can leverage these icons within their designs. Available in various formats like web fonts, SVG, or SVG sprite, Bootstrap icons offer flexibility to suit your preferences.
Bootstrap Icons Overview
Bootstrap Icons is a robust library containing over 1,300 high-quality SVG icons that seamlessly integrate with Bootstrap-based projects. These icons cover a wide range of categories, including common UI elements, navigation icons, social media icons, and more. Designed to be lightweight and customizable, Bootstrap Icons offer several benefits:
- Easy Integration: Bootstrap Icons are designed to work seamlessly with Bootstrap, making them effortless to integrate into your projects.
- Scalable Vector Graphics (SVG): Each icon is provided in SVG format, ensuring crisp and sharp rendering at any size without loss of quality.
- Versatility: Whether you’re building a website, web application, or mobile app, Bootstrap Icons can enhance your user interface with visually appealing and intuitive icons.
- Consistency: With a consistent design style and visual language, Bootstrap Icons help maintain a cohesive and professional look across your application.
Bootstrap Icons List
Here is a list of some commonly used Bootstrap icons along with their corresponding class names:
1) Action Icons:
- bi-alarm – Alarm clock
- bi-bookmark – Bookmark
- bi-check – Checkmark
- bi-download – Download arrow
- bi-heart – Heart
- bi-pencil – Pencil
- bi-trash – Trash can
- bi-upload – Upload arrow
2) Alert Icons:
- bi-exclamation-circle – Exclamation circle
- bi-info-circle – Information circle
- bi-question-circle – Question mark circle
- bi-x-circle – Close circle
3) Navigation Icons:
- bi-arrow-left – Left arrow
- bi-arrow-right – Right arrow
- bi-arrow-up – Up arrow
- bi-arrow-down – Down arrow
- bi-chevron-left – Left chevron
- bi-chevron-right – Right chevron
- bi-house-door – House door
- bi-list – List
4) Media Icons:
- bi-camera – Camera
- bi-film – Film reel
- bi-music-note – Music note
- bi-image – Image
- bi-play – Play button
- bi-pause – Pause button
5) Device Icons:
- bi-laptop – Laptop
- bi-tablet – Tablet
- bi-phone – Smartphone
6) Social Icons:
- bi-facebook – Facebook
- bi-twitter – Twitter
- bi-instagram – Instagram
- bi-linkedin – LinkedIn
- bi-youtube – YouTube
These are just a few examples of Bootstrap icons available. You can explore the full list of Bootstrap icons and their class names in the Bootstrap documentation or icon libraries provided by Bootstrap.
Bootstrap Icons React
To use Bootstrap Icons with React, you can install the bootstrap-icons package from npm. Here are the steps:
1) Install the package using npm or yarn:
npm install bootstrap-icons
- or
yarn add bootstrap-icons
2) Import the desired icon(s) in your React component:
import { IconName } from ‘bootstrap-icons/react’;
3) Replace IconName with the name of the specific icon you want to use.
Use the icon component in your JSX:
<IconName />
Replace IconName with the name of the icon component you imported.
Here’s an example of how you can use a Bootstrap icon in a React component:
import { Alarm } from ‘bootstrap-icons/react’;
function App() {
 return (
 <div>
 <h1>Bootstrap Icon Example</h1>
 <Alarm color=”red” size={48} />
 </div>
 );
}
export default App;
In this example, we import the Alarm icon from the bootstrap-icons/react package and use it within the JSX code of the App component.
Remember to check the Bootstrap Icons documentation for the available icons and their respective names.
Also Read: Bootstrap Cards: Media Objects and Examples
Bootstrap Icons Examples
Here are a few examples of how you can use Bootstrap Icons in your web projects:
1) Basic Usage:
<!DOCTYPE html>
<html lang=”en”>
<head>
 <meta charset=”UTF-8″>
 <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
 <title>Bootstrap Icons Example</title>
 <!– Include Bootstrap Icons CSS –>
 <link href=”https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css” rel=”stylesheet”>
</head>
<body>
 <!– Example of using a Bootstrap Icon –>
 <i class=”bi bi-alarm”></i>
</body>
</html>
2) Customizing Icon Size and Color:
<i class=”bi bi-alarm” style=”font-size: 2rem; color: red;”></i>
3) Using Bootstrap Icons in Buttons:
<button type=”button” class=”btn btn-primary”>
 <i class=”bi bi-camera”></i> Take Photo
</button>
4) Using Bootstrap Icons in Links:
<a href=”#” class=”btn btn-success”>
 <i class=”bi bi-download”></i> Download
</a>
5) Using Bootstrap Icons in Lists:
<ul class=”list-group”>
 <li class=”list-group-item”><i class=”bi bi-heart”></i> Like</li>
 <li class=”list-group-item”><i class=”bi bi-chat-left”></i> Comment</li>
 <li class=”list-group-item”><i class=”bi bi-share”></i> Share</li>
- </ul>
6) Using Bootstrap Icons in Forms:
<div class=”input-group mb-3″>
 <span class=”input-group-text”><i class=”bi bi-person”></i></span>
 <input type=”text” class=”form-control” placeholder=”Username”>
</div>
<div class=”input-group mb-3″>
 <span class=”input-group-text”><i class=”bi bi-lock”></i></span>
 <input type=”password” class=”form-control” placeholder=”Password”>
</div>
7) Using Bootstrap Icons in Alerts:
<div class=”alert alert-warning” role=”alert”>
 <i class=”bi bi-exclamation-triangle-fill”></i> Warning: This action cannot be undone.
</div>
8) Using Bootstrap Icons in Navbars:
<nav class=”navbar navbar-expand-lg navbar-light bg-light”>
 <div class=”container-fluid”>
 <a class=”navbar-brand” href=”#”><i class=”bi bi-house”></i> Home</a>
 <button class=”navbar-toggler” type=”button” data-bs-toggle=”collapse” data-bs-target=”#navbarNav” aria-controls=”navbarNav” aria-expanded=”false” aria-label=”Toggle navigation”>
 <span class=”navbar-toggler-icon”></span>
 </button>
 <div class=”collapse navbar-collapse” id=”navbarNav”>
 <ul class=”navbar-nav”>
 <li class=”nav-item”>
 <a class=”nav-link” href=”#”><i class=”bi bi-person”></i> Profile</a>
 </li>
 <li class=”nav-item”>
 <a class=”nav-link” href=”#”><i class=”bi bi-gear”></i> Settings</a>
 </li>
 </ul>
 </div>
 </div>
</nav>
9) Using Bootstrap Icons in Cards:
<div class=”card”>
 <div class=”card-body”>
 <h5 class=”card-title”><i class=”bi bi-geo-alt”></i> Location</h5>
 <p class=”card-text”>1234 Street Name, City, Country</p>
 </div>
10) Navigation Menu Icons:
You can use Bootstrap Icons to enhance your navigation menus by adding icons next to menu items. For example:
<ul class=”nav”>
 <li class=”nav-item”>
 <a class=”nav-link” href=”#”>
 <svg class=”bi” width=”16″ height=”16″ fill=”currentColor”>
 <use xlink:href=”path/to/your/copied/svg/file.svg#icon-name” />
 </svg>
 Home
 </a>
 </li>
 <li class=”nav-item”>
 <a class=”nav-link” href=”#”>
 <svg class=”bi” width=”16″ height=”16″ fill=”currentColor”>
 <use xlink:href=”path/to/your/copied/svg/file.svg#icon-name” />
 </svg>
 About
 </a>
 </li>
 <!– More menu items with icons –>
</ul>
11) Button Icons:
You can use Bootstrap Icons within buttons to provide visual cues or actions. For example:
<button type=”button” class=”btn btn-primary”>
 <svg class=”bi” width=”16″ height=”16″ fill=”currentColor”>
 <use xlink:href=”path/to/your/copied/svg/file.svg#icon-name” />
 </svg>
 Save
</button>
12) Form Input Icons:
You can use Bootstrap Icons inside form inputs to provide context or feedback. For example:
<div class=”input-group”>
 <span class=”input-group-text”>
 <svg class=”bi” width=”16″ height=”16″ fill=”currentColor”>
 <use xlink:href=”path/to/your/copied/svg/file.svg#icon-name” />
 </svg>
 </span>
 <input type=”text” class=”form-control” placeholder=”Username”>
</div>
13) Alert Icons:
You can use Bootstrap Icons in alerts to convey different message types. For example:
<div class=”alert alert-success” role=”alert”>
 <svg class=”bi” width=”16″ height=”16″ fill=”currentColor”>
 <use xlink:href=”path/to/your/copied/svg/file.svg#icon-name” />
 </svg>
 Your operation was successful!
- </div>
- </div>
How to use Bootstrap Icons?
To use Bootstrap Icons in your web projects, you can follow these steps:
1) Include Bootstrap Icons Library:
Bootstrap Icons are distributed as a font library, so you need to include the Bootstrap Icons CSS file in your HTML document. You can do this by adding a <link> tag in the <head> section of your HTML file.
<head>
 <link href=”https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css” rel=”stylesheet”>
</head>
Alternatively, you can download the Bootstrap Icons library and include it locally in your project.
2) Use Icon Classes:
Once the Bootstrap Icons library is included, you can use the icons by adding appropriate classes to HTML elements. Each icon has a specific class name that you can find in the Bootstrap Icons documentation.
<i class=”bi bi-heart”></i> <!– Heart icon –>
<i class=”bi bi-arrow-up-circle”></i> <!– Arrow up circle icon –>
Icons can be placed inside <i> or <span> elements.
3) Customize Icons:
Bootstrap Icons provide various options for customization. You can change the size of icons using Bootstrap spacing utility classes (bi-lg, bi-2x, bi-3x, etc.). You can also change the color of icons using CSS.
<i class=”bi bi-heart bi-lg text-danger”></i> <!– Large red heart icon –>
4) Explore Icon Options:
Bootstrap Icons offers a wide range of icons covering different categories such as actions, alerts, arrows, and more. You can explore the full list of available icons and their class names in the Bootstrap Icons documentation.
5) Advanced Usage:
For more advanced usage, you can use Bootstrap Icons with other Bootstrap components and utilities to create dynamic and interactive user interfaces.
By following these steps, you can easily incorporate Bootstrap Icons into your web projects and enhance the visual appeal of your UI elements.
Also Read: Bootstrap Contact Form: 10 Best Bootstrap Contact Forms 2024
How to Add Bootstrap Icons to Your Projects
To add Bootstrap Icons to your projects, you can follow these steps:
1) Include Bootstrap Icons Library:
First, you need to include the Bootstrap Icons library in your HTML document. You can do this by adding a <link> tag in the <head> section of your HTML file. You can use the Bootstrap CDN to link to the latest version of Bootstrap Icons.
<head>
 <link href=”https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css” rel=”stylesheet”>
</head>
Alternatively, you can download the Bootstrap Icons library and include it locally in your project.
2) Use Icon Classes:
Once the Bootstrap Icons library is included, you can use the icons by adding appropriate classes to HTML elements. Each icon has a specific class name that you can find in the Bootstrap Icons documentation.
<i class=”bi bi-heart”></i> <!– Heart icon –>
<i class=”bi bi-arrow-up-circle”></i> <!– Arrow up circle icon –>
Icons can be placed inside <i> or <span> elements.
3) Customize Icons:
You can customize the size and color of icons using Bootstrap utility classes and CSS. Bootstrap Icons support Bootstrap spacing utility classes (bi-lg, bi-2x, bi-3x, etc.) to change the size of icons. You can also apply text color classes (text-primary, text-danger, etc.) to change the color of icons.
<i class=”bi bi-heart bi-lg text-danger”></i> <!– Large red heart icon –>
4) Explore Icon Options:
Bootstrap Icons provides a wide range of icons covering different categories such as actions, alerts, arrows, and more. You can explore the full list of available icons and their class names in the Bootstrap Icons documentation.
5) Advanced Usage:
For more advanced usage, you can combine Bootstrap Icons with other Bootstrap components and utilities to create dynamic and interactive user interfaces.
By following these steps, you can easily add Bootstrap Icons to your projects and enhance the visual appeal of your UI elements.
Also Read: Bootstrap Datatable – Examples & Tutorial
Uses of Bootstrap Icons
Bootstrap Icons offer a wide range of applications and benefits in web development projects. Here are some common uses of Bootstrap Icons:
- User Interface Elements: Bootstrap Icons can be used to enhance user interface elements such as buttons, links, navigation menus, and input fields. They provide visual cues and improve the overall user experience.
- Navigation: Icons can be used alongside text in navigation menus to represent different sections or actions. This improves navigation clarity and helps users quickly identify the purpose of each menu item.
- Feedback and Alerts: Icons can convey feedback messages and alert users to important information. For example, a checkmark icon can indicate a successful action, while a warning icon can highlight potential errors or issues.
- Buttons and Actions: Icons can be added to buttons to visually represent their functionality. For instance, a “delete” button can include a trash can icon, and a “share” button can include a share icon.
- Form Elements: Icons can be used within form elements such as input fields, checkboxes, and radio buttons to provide context or instructions. For example, a search input field can include a magnifying glass icon.
- Media and Content: Icons can be used to represent different types of media or content, such as images, videos, documents, and links. This helps users quickly identify the type of content they are interacting with.
- Responsive Design: Bootstrap Icons are designed to be responsive and scale gracefully across different screen sizes and devices. They help maintain consistency and readability in responsive web designs.
- Customization: Bootstrap Icons can be easily customized using CSS to adjust their size, color, and appearance. This allows developers to match icons with the overall design theme of the website.
- Accessibility: Icons can improve accessibility by providing visual cues for users with disabilities. They can be paired with descriptive text or alternative text to ensure all users can understand their meaning.
Overall, Bootstrap Icons offer a versatile and effective way to enhance the visual appeal and usability of web applications and websites. They provide a consistent and standardized set of icons that align with modern design principles and user expectations.
Also Read: Bootstrap Examples – Everything You Need To Know
Bootstrap Icons NPM
Bootstrap Icons are not available as an NPM package by default. Instead, they are included as part of the Bootstrap framework. However, you can still use Bootstrap Icons in your project by including the necessary CSS and SVG files directly or by using a package manager like npm to install Bootstrap itself, which includes the icons.
Here’s how you can include Bootstrap Icons in your project using npm:
1) Install Bootstrap using npm:
npm install bootstrap
Once Bootstrap is installed, you can find the Bootstrap Icons SVG files in the node_modules/bootstrap-icons/icons directory.
Copy the SVG files you need from the node_modules/bootstrap-icons/icons directory to your project’s assets directory.
2) Include the necessary CSS file from Bootstrap in your project’s HTML:
<link href=”node_modules/bootstrap/dist/css/bootstrap.min.css” rel=”stylesheet”>
3) Use the SVG icons in your project’s HTML as needed:
<svg class=”bi” width=”32″ height=”32″ fill=”currentColor”>
 <use xlink:href=”path/to/your/copied/svg/file.svg#icon-name” />
</svg>
By following these steps, you can effectively use Bootstrap Icons in your project while leveraging npm for package management.
For Latest Tech Related Information, Join Our Official Free Telegram Group : PW Skills Telegram Group
Bootstrap Icons FAQ's
What are Bootstrap Icons?
Bootstrap Icons is a library containing over 1,300 SVG icons that are designed to integrate seamlessly with Bootstrap projects. These icons cover a wide range of categories and can be used to enhance the user interface of web and mobile applications.
How can I use Bootstrap Icons?
Bootstrap Icons can be easily integrated into your projects by including the necessary CSS and SVG files. You can then use the provided icon classes or directly embed SVG icons into your HTML code.
Can I use Bootstrap Icons without Bootstrap?
Yes, Bootstrap Icons are highly versatile and can be used with or without Bootstrap. You can simply include the necessary CSS and SVG files in your project and start using the icons right away.
In what formats are Bootstrap Icons available?
Bootstrap Icons are primarily available in SVG format, which ensures crisp and sharp rendering at any size without loss of quality. Additionally, they can also be used as web fonts or as part of an SVG sprite.
Are Bootstrap Icons customizable?
Yes, Bootstrap Icons are highly customizable. You can easily adjust properties such as color, size, and stroke using CSS to match your project's design requirements.