Vue.js · Directive
v-if
Use v-if to render content only when a condition is truthy. Use v-else-if and v-else for branches, or v-show to keep content in the DOM and toggle its display.
Last updated
Syntax
v-if="expression"In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
v-elsev-else-ifv-showv-for<template>