Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Right align components with Vuetify.js

I'm trying to right align a set of radio buttons in a Vuetify grid:

<v-layout row wrap align-start justify-end fill-height>
   <v-flex xs12 class="text-xs-right">
      <v-radio-group row hide-details>
         <v-radio label="Public"></v-radio>
         <v-radio label="Private"></v-radio>
      </v-radio-group>                    
   </v-flex>
</v-layout>

They always stay left though. How is right alignment achieved?

Fiddle here:

https://jsfiddle.net/80mq5rhf/

like image 742
Kong Avatar asked Sep 09 '18 23:09

Kong


1 Answers

You could put a <v-spacer> inside your <v-radio-group>. That will fill the available space on the left of the buttons.

<v-radio-group row>
  <v-spacer></v-spacer>
  <v-radio label="Public"></v-radio>
  <v-radio label="Private"></v-radio>
</v-radio-group>

Another way would be to add an offset to your <v-flex>

<v-flex xs12 offset-xs8>
  <v-radio-group row>
    <v-radio label="Public"></v-radio>
    <v-radio label="Private"></v-radio>
  </v-radio-group>                    
</v-flex>
like image 80
jordanw Avatar answered Oct 16 '22 06:10

jordanw