Cloak#
Demo#
Cloaked text
Explanation#
This example displays how to prevent flickering of the element before Datastar has processed the DOM.
By removing the cloak
class on initialisation, there will never be any flickering on load.
<style>
cloak {
opacity: 0;
transition: opacity 1s;
}
</style>
<div
class="cloak"
data-class="{cloak:false}"
>
Cloaked text
</div>