Kong
Kong

Reputation: 9586

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/

Upvotes: 7

Views: 26184

Answers (1)

jordanw
jordanw

Reputation: 1505

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>

Upvotes: 8

Related Questions