Skip to content

Instantly share code, notes, and snippets.

@buildbro
Last active November 7, 2022 13:34
Show Gist options
  • Save buildbro/d85f2e777ed8bb07ba03c1efd7337ead to your computer and use it in GitHub Desktop.
Save buildbro/d85f2e777ed8bb07ba03c1efd7337ead to your computer and use it in GitHub Desktop.
Add bootstrap to vue

Here's a simple way to add bootstrap to your vue 3 project

Step 1 - Install bootstrap package

cd to your vue project's root directory and run the following command:

npm install bootstrap

Step 2 - Import bootstrap in main.js

Add the following import to the top import section of your main.js file:

import 'bootstrap/dist/css/bootstrap.min.css'

Step 3 - Test/Use bootstrap in any component in your project.

Add the following class to a button in any page/component to validate that bootstrap works:

class="btn btn-primary"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment