[Vuejs]-Laravel bootstrap-vue not working with nav collapse

3πŸ‘

βœ…

I think it is because you’re not using any Bootstrap-Vue components in your markup. In your case the navbar would have to look something like:

<b-navbar toggleable="lg" type="light" variant="light">
    <b-navbar-brand href="#">NavBar</b-navbar-brand>

    <b-navbar-toggle target="nav-collapse"></b-navbar-toggle>

    <b-collapse id="nav-collapse" is-nav>
      <b-navbar-nav>
        <b-nav-item href="#">Home</b-nav-item>
        <b-nav-item href="#">Features</b-nav-item>
        <b-nav-item href="#">Pricing</b-nav-item>
      </b-navbar-nav>
    </b-collapse>
  </b-navbar>

You can find more info about the navbar component here

Additionally, like porloscerros Ξ¨ mentioned, you need to set id=app on either the body element or create a div with id=app which contains your (Bootstrap-Vue) components.

πŸ‘€Sidney Gijzen

Leave a comment