I'm trying to create a grid layout but am having trouble.
The layout I'm trying to create is attached in the image below. It's easier to show than explain.
Using the vuetify grid layout system, i've tried to get it but can't get it to nicely fill out all the space. My code is below.
Is there a nice way to create this grid layout?
<v-container fluid grid-list-md box>
<v-layout row>
<v-flex d-flex xs3>
<v-layout row wrap>
<v-card color="orange lighten-2" tile flat>
<v-card-text>{{ lorem.slice(0, 90) }}</v-card-text>
</v-card>
<v-divider></v-divider>
<v-card color="orange lighten-2" tile flat>
<v-card-text>{{ lorem.slice(0, 90) }}</v-card-text>
</v-card>
<v-divider></v-divider>
<v-card color="orange lighten-2" tile flat>
<v-card-text>{{ lorem.slice(0, 90) }}</v-card-text>
</v-card>
<v-divider></v-divider>
<v-card color="orange lighten-2" tile flat>
<v-card-text>{{ lorem.slice(0, 90) }}</v-card-text>
</v-card>
</v-layout>
</v-flex>
<v-flex d-flex xs9>
<v-layout row wrap>
<v-layout row>
<v-flex d-flex>
<v-card color="blue-grey" dark tile flat>
<v-card-text>{{ lorem }}</v-card-text>
</v-card>
</v-flex>
<v-flex d-flex>
<v-card color="blue-grey" dark tile flat>
<v-card-text>{{ lorem }}</v-card-text>
</v-card>
</v-flex>
</v-layout>
<v-layout row>
<v-flex d-flex xs9>
<v-card color="blue-grey" dark tile flat>
<v-card-text>{{ lorem }}</v-card-text>
</v-card>
</v-flex>
</v-layout>
</v-layout>
</v-flex>
</v-layout>
</v-container>
You can achieve that format by using the fill-height prop and the breakpoints. Having <v-layout row wrap>
will force the larger box with xs12
to take up the entire next row, so you don't have to create it's own layout.
<v-layout row wrap>
<v-flex d-flex xs6>
<v-card color="blue-grey" dark tile flat>
<v-card-text>{{ lorem }}</v-card-text>
</v-card>
</v-flex>
<v-flex d-flex xs6>
<v-card color="blue-grey" dark tile flat>
<v-card-text>{{ lorem + lorem }}</v-card-text>
</v-card>
</v-flex>
<v-flex fill-height d-flex xs12>
<v-card color="blue-grey" dark tile flat>
<v-card-text>{{ lorem + lorem + lorem}}</v-card-text>
</v-card>
</v-flex>
</v-layout>
Here is a codepen that shows it in action.