Skip to content

Instantly share code, notes, and snippets.

Avatar

Eduardo Guzmán H. eduarguz

View GitHub Profile
@eduarguz
eduarguz / v-cloak.md
Created Apr 4, 2019 — forked from adamwathan/v-cloak.md
Useful CSS utilities for Vue.js cloaking
View v-cloak.md

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
  </h1>