Add lvt-fx:highlight="flash" to an element and it briefly flashes a background color
whenever a render updates anything inside it. The effect is per-element, not per-value:
two elements bound to the same counter both flash when it changes. Customize the look
with --lvt-highlight-duration (default 500ms) and --lvt-highlight-color (default
amber #ffc107).
Highlight on Change
lvt-fx:highlight="flash" flashes a temporary background color whenever a render touches the element's subtree. Both displays below share the same counter — clicking Increment flashes both, demonstrating that the directive is per-element, not per-changed-value. Duration via --lvt-highlight-duration (default 500ms); color via --lvt-highlight-color (default amber #ffc107).
Counter A: 0
Counter B (mirror): 0
Template
One button increments a shared counter; two separate lvt-fx:highlight="flash" blocks
mirror it, so both flash on every change.
{{define "content"}}
<article>
<h3>Highlight on Change</h3>
<p><small><code>lvt-fx:highlight="flash"</code> flashes a temporary background color whenever a render touches the element's subtree. Both displays below share the <em>same</em> counter — clicking Increment flashes <strong>both</strong>, demonstrating that the directive is per-element, not per-changed-value. Duration via <code>--lvt-highlight-duration</code> (default 500ms); color via <code>--lvt-highlight-color</code> (default amber <code>#ffc107</code>).</small></p>
<form method="POST">
<button name="increment">Increment</button>
</form>
<div lvt-fx:highlight="flash">
<p>Counter A: <strong>{{.Counter}}</strong></p>
</div>
<div lvt-fx:highlight="flash">
<p>Counter B (mirror): <strong>{{.Counter}}</strong></p>
</div>
</article>
{{end}}