v-bind ผูกด้วย แอตทริบิวต์ HTML (หรือ prop ของคอมโพเนนต์) ไปยังนิพจน์ JavaScript แบบไดนามิก ดังนั้นแอตทริบิวต์จะอัปเดตแบบรีแอกทีฟเมื่อข้อมูลเปลี่ยน ชื่อย่อของมันคือเพียง :
<script setup>
import { ref } from "vue";
const imageUrl = ref("/photo.jpg");
const isDisabled = ref(true);
const id = ref("main");
</script>
<template>
<img v-bind:src="imageUrl" /> <!-- full syntax -->
<img :src="imageUrl" /> <!-- shorthand (idiomatic) -->
<button :disabled="isDisabled">Save</button>
<div :id="id" :data-index="5">...</div>
</template>
