Answers for "Hide elements until Alpine Js loads"

1

Hide elements until Alpine Js loads

//Add `x-cloak` to any element you wish to hide while alpine loads
// It'll be removed when Alpine is loaded
<div class="step2" x-show="condition" x-cloak >...
// Also add the following to your css
[x-cloak] {
    display: none !important;
}
Posted by: Guest on January-21-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language