Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the Vuetify carousel height

Is it possible to reduce the height of a <v-carousel>? I saw in the documentation that they were working on it, but has it been implemented yet? If not is there a work around? I'm just trying to set a max height.

like image 633
Otto Avatar asked Jun 27 '18 16:06

Otto


2 Answers

You can set auto height of it:

<v-carousel height="auto">
like image 113
mr_squall Avatar answered Nov 03 '22 17:11

mr_squall


There's no need to use CSS neither important on it. You can use one prop to change the height:

Name: height

Default: 500

Type: number | string Sets the component height

Eg.

  <v-carousel height="500px">
    <v-carousel-item
      v-for="(item,i) in items"
      :key="i"
      :src="item.src"
    ></v-carousel-item>
  </v-carousel>
like image 5
Fabio Zanchi Avatar answered Nov 03 '22 17:11

Fabio Zanchi