Vuetify: v-container fluid="false" not working

Created on 9 Aug 2017  路  9Comments  路  Source: vuetifyjs/vuetify

I try to test v-container full-width or center by set fluid="false" but not working. How to do it?

<v-app>
  <v-navigation-drawer></v-navigation-drawer>
  <v-toolbar></v-toolbar>
  <main>
    <v-container fluid="isFullWidth">
      <router-view></router-view>
    </v-container>
  </main>
  <v-footer></v-footer>
</v-app>
<script>
  export default {
    data () {
      return {
        isFullWidth: false,       
      }
    }
  }
</script>

Most helpful comment

use <v-container v-bind="{ fluid: isFullWidth } ">

All 9 comments

:fluid="false"

Not work. It's alway display full width

Seems that the attribute does not take values, but simply passes all the attributes to classes
https://github.com/vuetifyjs/vuetify/blob/b4742ec9f53c7be140c36b3d4d22a30d2ea0308b/src/components/grid/index.js#L15-L18

It's work but so long I think that it's need better solution.

  <v-container ref="container">
                if (width == "FULL_WIDTH") {
                    console.log('FULL WIDTH CONTENT')
                    this.$refs.container.setAttribute("fluid", true)
                    this.$refs.container.setAttribute("class", "pa-0")
                } else {
                    console.log('CENTER CONTENT')
                    this.$refs.container.removeAttribute("fluid")
                }

use <v-container v-bind="{ fluid: isFullWidth } ">

Thanks @johnleider , I tried, but It's not work. Did you test it?

https://codepen.io/cawa-93/pen/zdzqrV?editors=1010#0

<v-container :class="{fluid: isFullWidth}">

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Antway picture Antway  路  3Comments

milleraa picture milleraa  路  3Comments

jofftiquez picture jofftiquez  路  3Comments

dschreij picture dschreij  路  3Comments

paladin2005 picture paladin2005  路  3Comments