[Vuejs]-How to set v-btn in bottom left and bottom right vue js vutify?

1👍

v-card-actions are flexbox. Just use ml-auto on the 2nd btn…

    <v-card>
        <v-card-actions>
            <v-btn color="primary">SignUp</v-btn>
            <v-btn color="primary" class="ml-auto">Login</v-btn>
        </v-card-actions>
    </v-card>

OR, justify-space-between on the container…

    <v-card>
        <v-card-actions class="justify-space-between">
            <v-btn color="primary">SignUp</v-btn>
            <v-btn color="primary">Login</v-btn>
        </v-card-actions>
    </v-card>

https://codeply.com/p/fhnhCdH1aj

0👍

You can easily achieve this using responsive flexbox utilities like:

<v-card-actions>
    <v-spacer class="d-flex justify-space-between align-end" />
    <v-btn color="primary">SignUp</v-btn>
    <v-btn color="primary">Login</v-btn>
</v-card-actions>

DEMO:

new Vue({
  el: '#app',
  vuetify: new Vuetify(),
})
.spacer{height:90vh}
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>

<div id="app">
  <v-app>
    <v-card-actions>
      <v-spacer class="d-flex justify-space-between align-end" />
      <v-btn color="primary">SignUp</v-btn>
      <v-btn color="primary">Login</v-btn>
    </v-card-actions>
  </v-app>
</div>

Leave a comment