v-else
Updated on Sep 5, 2025 1 minutes to readThe v-else directive provides a fallback element that is rendered if all preceding v-if / v-else-if conditions are false
.
• Example
<div v-if="vars.status === 'loading'">Loading...</div>
<div v-else-if="vars.status === 'success'">Data loaded!</div>
<div v-else>Error occurred.</div>