---
title: "Directives · vuejs.school"
description: "Bind attributes, show things conditionally and render lists with v-bind, v-if, v-show and v-for."
canonical_url: "https://vuejs.school/learn/beginner/directives"
meta:
  "og:description": "Bind attributes, show things conditionally and render lists with v-bind, v-if, v-show and v-for."
  "og:image": "https://vuejs.school/_og/d/a_~RGlyZWN0aXZlcyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Directives%2Cdescription_~QmluZCBhdHRyaWJ1dGVzLCBzaG93IHRoaW5ncyBjb25kaXRpb25hbGx5IGFuZCByZW5kZXIgbGlzdHMgd2l0aCB2LWJpbmQsIHYtaWYsIHYtc2hvdyBhbmQgdi1mb3Iu%2Ceyebrow_~QmVnaW5uZXIgwrcgTGVzc29uIDMgb2YgMTE%2Ctint_mint%2Cp_Ii9sZWFybi9iZWdpbm5lci9kaXJlY3RpdmVzIg%2Cs_W263KgwFFljOLEiL.png"
  "og:image:alt": "Directives · vuejs.school"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Directives · vuejs.school"
  "twitter:image": "https://vuejs.school/_og/d/a_~RGlyZWN0aXZlcyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Directives%2Cdescription_~QmluZCBhdHRyaWJ1dGVzLCBzaG93IHRoaW5ncyBjb25kaXRpb25hbGx5IGFuZCByZW5kZXIgbGlzdHMgd2l0aCB2LWJpbmQsIHYtaWYsIHYtc2hvdyBhbmQgdi1mb3Iu%2Ceyebrow_~QmVnaW5uZXIgwrcgTGVzc29uIDMgb2YgMTE%2Ctint_mint%2Cp_Ii9sZWFybi9iZWdpbm5lci9kaXJlY3RpdmVzIg%2Cs_W263KgwFFljOLEiL.png"
  "twitter:image:alt": "Directives · vuejs.school"
---

> Index of every page on this site: [llms.txt](https://vuejs.school/llms.txt)

# **Directives**

Bind attributes, show things conditionally and render lists with v-bind, v-if, v-show and v-for.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://vuejs.school/#website","@type":"WebSite","description":"A free AI-instructed school for Vue.js. Short tutorials, runnable code and quizzes that adapt to you.","name":"vuejs.school","url":"https://vuejs.school/","publisher":{"@id":"https://vuejs.school/#identity"}},{"@id":"https://vuejs.school/learn/beginner/directives#webpage","@type":"WebPage","description":"Bind attributes, show things conditionally and render lists with v-bind, v-if, v-show and v-for.","name":"Directives","url":"https://vuejs.school/learn/beginner/directives","breadcrumb":{"@id":"https://vuejs.school/learn/beginner/directives#breadcrumb"},"isPartOf":{"@id":"https://vuejs.school/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://vuejs.school/learn/beginner/directives"]}],"primaryImageOfPage":{"@id":"https://vuejs.school/#logo"}},{"@id":"https://vuejs.school/#identity","@type":"Organization","description":"A free AI-instructed school for Vue.js. Short tutorials, runnable code and quizzes that adapt to you.","name":"vuejs.school","url":"https://vuejs.school","logo":{"@id":"https://vuejs.school/#logo"}},{"@id":"https://vuejs.school/learn/beginner/directives#article","description":"Bind attributes, show things conditionally and render lists with v-bind, v-if, v-show and v-for.","headline":"Directives","inLanguage":"en","isAccessibleForFree":true,"thumbnailUrl":"https://vuejs.school/_og/d/a_~RGlyZWN0aXZlcyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Directives%2Cdescription_~QmluZCBhdHRyaWJ1dGVzLCBzaG93IHRoaW5ncyBjb25kaXRpb25hbGx5IGFuZCByZW5kZXIgbGlzdHMgd2l0aCB2LWJpbmQsIHYtaWYsIHYtc2hvdyBhbmQgdi1mb3Iu%2Ceyebrow_~QmVnaW5uZXIgwrcgTGVzc29uIDMgb2YgMTE%2Ctint_mint%2Cp_Ii9sZWFybi9iZWdpbm5lci9kaXJlY3RpdmVzIg%2Cs_W263KgwFFljOLEiL.png","@type":["Article","TechArticle"],"articleSection":["Templates"],"author":{"@id":"https://vuejs.school/#identity"},"image":{"@id":"https://vuejs.school/#/schema/image/1"},"isPartOf":{"@id":"https://vuejs.school/learn/beginner/directives#webpage"},"keywords":["v-bind","v-if","v-for",":key","v-show"],"mainEntityOfPage":{"@id":"https://vuejs.school/learn/beginner/directives#webpage"},"publisher":{"@id":"https://vuejs.school/#identity"}},{"@id":"https://vuejs.school/learn/beginner/directives#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Skill tree","item":"https://vuejs.school/track","position":1},{"@type":"ListItem","name":"Beginner","item":"https://vuejs.school/track/beginner","position":2},{"@type":"ListItem","name":"Directives","position":3}]},{"@id":"https://vuejs.school/#logo","@type":"ImageObject","caption":"vuejs.school","contentUrl":"https://vuejs.school/apple-touch-icon.png","inLanguage":"en","url":"https://vuejs.school/apple-touch-icon.png"},{"@id":"https://vuejs.school/#/schema/image/1","@type":"ImageObject","contentUrl":"https://vuejs.school/_og/d/a_~RGlyZWN0aXZlcyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Directives%2Cdescription_~QmluZCBhdHRyaWJ1dGVzLCBzaG93IHRoaW5ncyBjb25kaXRpb25hbGx5IGFuZCByZW5kZXIgbGlzdHMgd2l0aCB2LWJpbmQsIHYtaWYsIHYtc2hvdyBhbmQgdi1mb3Iu%2Ceyebrow_~QmVnaW5uZXIgwrcgTGVzc29uIDMgb2YgMTE%2Ctint_mint%2Cp_Ii9sZWFybi9iZWdpbm5lci9kaXJlY3RpdmVzIg%2Cs_W263KgwFFljOLEiL.png","inLanguage":"en","url":"https://vuejs.school/_og/d/a_~RGlyZWN0aXZlcyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Directives%2Cdescription_~QmluZCBhdHRyaWJ1dGVzLCBzaG93IHRoaW5ncyBjb25kaXRpb25hbGx5IGFuZCByZW5kZXIgbGlzdHMgd2l0aCB2LWJpbmQsIHYtaWYsIHYtc2hvdyBhbmQgdi1mb3Iu%2Ceyebrow_~QmVnaW5uZXIgwrcgTGVzc29uIDMgb2YgMTE%2Ctint_mint%2Cp_Ii9sZWFybi9iZWdpbm5lci9kaXJlY3RpdmVzIg%2Cs_W263KgwFFljOLEiL.png"}]}
```