Reputation: 707
Wasn't this component supposed to render lists? It produces only divs instead of more semantic elements, couldn't it be considered a bad practice? Should I use native html tags instead of this component if i desire semantic html?
Upvotes: 1
Views: 1695
Reputation: 6103
This component does render a list. Though they do use div
s by default, their API provides a way to change this behavior - you can specify tags on your v-list:
<v-list tag='ul'>
<template v-for="(item, index) in items">
<v-list-item tag='li' :key='index'>
{{ item }}
</v-list-item>
</template>
</v-list>
This will render a ul/li list.
Upvotes: 6