Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Bootstrap Icons

Bootstrap Icons Laravel Package

twbs/bootstrap-icons

Official open source SVG icon library for Bootstrap, offering over 2,000 free, MIT-licensed icons. Install via npm (bootstrap-icons) or Composer, then use as embedded HTML, img tags, an SVG sprite, or CSS. Also available in Figma.

View on GitHub
Deep Wiki
Context7

Bootstrap Icons is the official open source SVG icon library for Bootstrap, shipping over 2,000 scalable, pixel-perfect icons. Install it in Laravel or PHP projects via Composer (composer require twbs/bootstrap-icons) or npm, then use the processed SVGs however your stack prefers—embedded inline, referenced with <img>, bundled as an SVG sprite, or included through CSS.

  • 2,000+ icons covering UI, brands, and interface symbols
  • Multiple usage modes: inline SVG, <img>, sprite, or CSS
  • Distributed via Composer, npm, and Figma
  • MIT licensed and maintained by the Bootstrap team
  • Actively developed with regular releases
Frequently asked questions about Bootstrap Icons
How do I install twbs/bootstrap-icons in a Laravel project?
Run composer require twbs/bootstrap-icons, which pulls the published package containing processed SVGs; you can also install via npm i bootstrap-icons. The Composer package is a static asset library, so after installing you still need to expose the SVGs to your frontend through Vite, Mix, or a copy step. No service provider or configuration is required.
Does twbs/bootstrap-icons support Laravel 11 and Vite?
Yes. Bootstrap Icons is framework-agnostic static SVG assets, so it works with any Laravel version and with Vite or Laravel Mix. Asset paths in v1.13.2 are unchanged, so existing mix.copy() calls or Vite publicDir configuration continue to work. You simply import the CSS in your Sass entry point or copy SVGs to public/assets and rebuild.
How do I use Bootstrap Icons inside Laravel Blade templates?
You can embed icons directly in Blade with markup such as <i class='bi bi-cart'></i> after loading the icon CSS. Alternatively, reference individual SVGs with an img tag or inline the SVG contents for full styling control. For repeated icons, an SVG sprite keeps markup small and cache-friendly.
Is twbs/bootstrap-icons a PHP package with backend integration?
No. It is the official frontend SVG icon library for Bootstrap, published to Packagist only for Composer convenience. It contains no service providers, Eloquent hooks, Query Builder integration, or backend logic. Laravel's role is simply to serve or bundle the static SVG and CSS assets.
How do I publish Bootstrap Icons assets to Laravel's public directory?
Either copy the node_modules/bootstrap-icons/font and svg folders into public/assets during your build, or install via Composer and copy the package's font and icons directories. With Vite, import bootstrap-icons/font/bootstrap-icons.css in your app.css and let the bundler handle the assets. With Mix, use mix.copy() to move the font files and reference the CSS.
What is the best way to include Bootstrap Icons in a Laravel app: CSS, sprite, or embedded SVG?
The CSS font method is simplest: import bootstrap-icons.css and use bi bi-* classes in Blade. SVG sprites are better for many repeated icons and benefit from HTTP caching; embedded SVG gives the most control over color and accessibility but increases HTML size. All three use the same packaged SVGs and can coexist.
Is twbs/bootstrap-icons compatible with Bootstrap 5 and Bootstrap 6?
It is designed for Bootstrap 5+ and integrates cleanly with Bootstrap 5 themes. Version 1.13.2 is being developed alongside Bootstrap 6 Alpha 1, which signals the icon set will track the next major Bootstrap release rather than fork. Expect a potential major icon revision with Bootstrap 6, so budget design-system migration time now.
Will upgrading to twbs/bootstrap-icons v1.13.2 break my Laravel Blade templates?
No. v1.13.2 is a maintenance release with no icon additions, removals, renames, CSS class changes, or sprite structure changes. It is safe as a patch-level bump under a ~1.13.0 or ^1.13.0 constraint. Typical upgrade effort is under 30 minutes: dependency bump, npm ci, asset rebuild, and a visual smoke test.
Are Bootstrap Icons fast enough for production in a Laravel app?
Yes. The SVGs are optimized and small, roughly 10KB total in many bundles, and there are no runtime dependencies. Serve the CSS and font or sprite through Laravel's cache middleware or a CDN, and set long cache headers. If you use the SVG use element, host icons locally or configure CORS to avoid Chrome cross-origin issues.
What are alternatives to twbs/bootstrap-icons, and does it support TypeScript?
Alternatives include Heroicons, Font Awesome, Lucide, and Tabler Icons, but Bootstrap Icons is the natural fit if you already use Bootstrap 5. It is MIT-licensed with over 2,000 icons and is also available in Figma. v1.13.2 adds literal icon-name types for TypeScript users, which improves autocomplete and typo resistance with zero runtime effect.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager