Vue 3 · Components

Render conditionally

Add or remove an element depending on a condition.

<p v-if="loading">Loading...</p>
<p v-else>Done</p>

Official Vue 3 documentation

More components commands

All components commands · Vue 3 cheatsheet

Was this page helpful?