How to add bootstrap icons to your Vue.js app

Task: Add icons library to your project

Implementation:

  1. Create Vue.js project (if not exists):
    vue create vue3-bootstrap-test
  2. Add and install bootstrap library:
    npm install bootstrap-icons
  3. Import bootstrap.css file in the main.js file (at the top):
    import "bootstrap-icons/font/bootstrap-icons.css"
  4. Import bootstrap.js file in the main.js file (at the bottom):
    import "bootstrap/dist/js/bootstrap.js"
  5. Try to use bootstrap controls in your app:
    <i class="bi bi-facebook"></i>

Done.

Leave a Reply

Your email address will not be published. Required fields are marked *




Enter Captcha Here :