Reputation: 387
i am trying to do this but unable to set two button in two bottom corner. Following code keeping two buttons side by side.But i need one button in left and other in right.
<v-card-actions>
<v-spacer />
<v-btn color="primary" v-on:click="gotosignup">SignUp</v-btn>
<v-btn color="primary" v-on:click="gotohome">Login</v-btn>
</v-card-actions>
]
Upvotes: 0
Views: 3902
Reputation: 362290
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
Upvotes: 1
Reputation: 73896
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/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/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>
Upvotes: 0