Sheath rule
blade-reactive-template-structure
Reactive templates must have the structure Alpine and Livewire instantiate.
#Why
Alpine x-if, x-for, and x-teleport templates and Livewire @teleport
blocks must match the structure their runtimes consume. Structural Alpine
directives belong on <template>, and every reachable Blade path needs one
concrete root. Coverage also includes x-for grammar, static collections,
teleport selectors, and x-transition placement under x-if.
x-ignore boundaries and conditional Blade branches are respected. A dynamic
component or output expression is not checked when it determines the runtime
root.
#Examples
#Bad
<div x-if="open">Visible</div>
#Good
<template x-if="open">
<div>Visible</div>
</template>