Home > other >  Is it possibile to use Bootstrap 5 icons with Bootstrap 4
Is it possibile to use Bootstrap 5 icons with Bootstrap 4

Time:09-28

As stated in the title, i would like to use bootstrap 5 icons in a bootstrap 4 prject. That because i have a legacy web application that use bootstrap 4 font awesome, and i need to make that web application to work in tandem with a bootsrap 5 web application.

Bootstrap 4 and 5 have a similar look and feel, so no issue about apperance, but the icon set are differnet and that is a problem.

CodePudding user response:

Bootstrap Icons and the Bootstrap library don't have any link. They are independent of each other so there is no problem in using them together, and there is no Bootstrap Icons version 5. The latest Icons version is v1.9.0.

Given below is an example where both bootstrap v1.9.1 Icons and Bootstrap v4.6.2 library are used.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI N" crossorigin="anonymous"><link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.9.1/font/bootstrap-icons.min.css" rel="stylesheet"/>

<div  role="alert">
  This is a Bootstrap icon v1.9.1 in a Bootstrap 4 alert component. <i ></i>
</div>

  • Related