Hi Dev's, i'm new in Bootstrap-Vue.
How I can customize the navbar background and text colors?
Thanks.
Hi Dev's, i'm new in Bootstrap-Vue.
How I can customize the navbar background and text colors?
Thanks.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (4)
BootstrapVue uses Bootstrap V4.3's SCSS for styling and variants.
You can either custom theme Bootstrap V4.3's SCSS (via SCSS variables) to change the default colors for each variant, or you can create custom variants in CSS/SCSS.
Navbar's use the classes
bg-<variant name>to define the background color.You could create a class
bg-foobarwhich has CSSbackground-color: #112233;.For those who are still struggling with this, here is my solution with Bootstrap
^4.5.2, Bootstrap-Vue^2.17.3, and Vue^2.6.11:1. Add bootstrap-vue to your project:
vue add bootstrap-vueWith this CLI command, Bootstrap and Bootstrap-Vue will be installed and configured into your project automatically.
2. Create a
custom.scssfile where you will override the default Bootstrap values, or in your case the color variants (I created mine into a/src/stylesdirectory). Don't forget to import Bootstrap from thenode_modulesright after your custom values./src/styles/_custom.scssYou can find all the customizable variables in
/node_modules/bootstrap/scss/_variables.scss3. Import the styles file into your
App.vuestyle section:App.vueI don't know if the solution I found is still valid because I'm not familiar with the library but it's usually a good strategy to peruse the issue tracker (especially the closed issues) of an open source project when the documentation falls short. Maybe this is what you're looking for github.com/bootstrap-vue/bootstrap...
Check out the BootstrapVue theming docs at bootstrap-vue.js.org/docs/referenc...