Logo

Fixed height and fixed header

<v-simple-table fixed-header height="300px">
  <template v-slot:default>
    <thead>
      <tr>
        <th class="text-left">Name</th>
        <th class="text-left">Calories</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="item in desserts" :key="item.name">
        <td>{{ item.name }}</td>
        <td>{{ item.calories }}</td>
      </tr>
    </tbody>
  </template>
</v-simple-table>

Use the fixed-header prop together with the height prop to fix the header to the top of the table.

NameCalories
Frozen Yogurt159
Ice cream sandwich237
Eclair262
Cupcake305
Gingerbread356
Jelly bean375
Lollipop392
Honeycomb408
Donut452
KitKat518

Dense

<v-simple-table dense>
  <template v-slot:default>
    <thead>
      <tr>
        <th class="text-left">Name</th>
        <th class="text-left">Calories</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="item in desserts" :key="item.name">
        <td>{{ item.name }}</td>
        <td>{{ item.calories }}</td>
      </tr>
    </tbody>
  </template>
</v-simple-table>
NameCalories
Frozen Yogurt159
Ice cream sandwich237
Eclair262
Cupcake305
Gingerbread356
Jelly bean375
Lollipop392
Honeycomb408
Donut452
KitKat518