vsn-get / vsn-target / vsn-swap
Use vsn-get to fetch HTML and insert it into a target element. It’s the VSN version of htmx-style partials.
Basic usage
<div id="nav"
vsn-get!load="navigation.html"
vsn-swap="inner">
</div>
Targeting another element
<button vsn-get="/fragment" vsn-target="#panel" vsn-swap="outer">
Load
</button>
<div id="panel"></div>
Trusted content
Add !trusted if the response contains VSN behaviors:
<div vsn-get!trusted="/fragment" vsn-swap="inner"></div>