List

Reference

base"list"
String
Base name used to style component

mod-itemempty string
String
Style of the list item

mod-listempty string
String
Style of the main list element

nameempty string
String
Name of the component

tag"div"
String
Defines tag to use in the list item child component (for example 'div', 'a' or 'button')

variantempty string
String
Active variant of the element mod-* props

widthundefined
String
Components width
Slots
default
Slot for the v-list-item components
Components

v-list-item


Example - props

Gratiana Bullene
Senior Developer
Training
Gert Boddam
Junior Executive
Legal
Evelyn Fick
Assistant Professor
Business Development
Nisse Merit
Cost Accountant
Human Resources
Antonetta Chard
Operator
Training
list
div
    <template>
  <v-list
    :tag="example.tag"
    :base="example.base"
    class="w-auto md:w-[500px]"
  >
    <v-list-item
      v-for="item in example.users"
      :active="item.active"
    >
      <div class="flex gap-x-4">
        <div>
          <div class="font-semibold">
            {{ item.full_name }}
          </div>
          <div class="text-text-400">
            {{ item.title }}
          </div>
        </div>
        <div class="text-sm text-gray-400 ml-auto">
          {{ item.department }}
        </div>
      </div>
    </v-list-item>
  </v-list>

</template>
  
    <script setup>
import { reactive } from "vue";
import company from "../example-data/company.json";

let example = reactive({
  users: company.slice(0, 5).map((i) => ({ ...i, active: false })),
  tag: "div",
  base: "list",
});

example.users[2].active = true;
</script>