Categoryjavascript

Alpine.js < template > and x-if or x-if ! (not)

A

How to use x-if and x-if “not” syntax in Alpine.js I was recently working on a file where I wanted to use an if statement and an if not statement. This is the Alpine.js syntax that worked for me. To note, Alpine.js docs state that “x-if must be declared on a <template> tag.”  My code snippet below was used for a form on a website that uses...

Recent Posts

Archives

Categories