How to add bootstrap 5 library to your Vue.js app

Task: Add 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
  3. Import bootstrap.css file in the main.js file (at the top):
    import "bootstrap/dist/css/bootstrap.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.

Done.

Leave a Reply

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




Enter Captcha Here :