Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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;
}
Source by ryangjchandler.co.uk #
 
PREVIOUS NEXT
Tagged: #Hide #elements #Alpine #Js #loads
ADD COMMENT
Topic
Name
2+5 =