<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<h3>Vue v-for Only First</h3>
<div id="app">
<div v-for="(item, index) in items" :key="index">
<p v-if="index === 0">First element: {{ item }}</p>
</div>
</div>
<script type="module">
const app = new Vue({
el: "#app",
data: {
items: ['Apple', 'Banana', 'Orange', 'Grapes']
}
})
</script>
</body>
</html>