Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<div class="text">hello</div>
<button @click="color = 'blue'"> Make Blue </button>
<child-component />
import ChildComponent from './ChildComponent.vue'
export default {
components: {
data() {
return {
color: 'red',
font: {
weight: '800'
.text {
color: v-bind(color);
/* expressions (wrap in quotes) */
font-weight: v-bind('font.weight');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment