VSN.js VSN.js
Docs Examples npm GitHub
Get started
Docs
Start Here
What is VSN Quick Start First Behavior
Essentials
Installation Behaviors & Selectors State & Scope Bindings Events Lifecycle Queries
Directives (Attributes)
vsn-bind vsn-on:* vsn-if vsn-show vsn-html vsn-get / vsn-target / vsn-swap vsn-each
CFS Language
Syntax reference Expressions Functions Destructure/spread Pipes (|>) Template literals
Modifiers & Flags
!important !debounce Event Modifiers
Runtime & Scope
Scope chain rules Root scope behavior State merge/specificity Error Handling
Integrations
SSR patterns htmx-style partials Build/bundler usage (ESM/CJS)
Plugins
sanitize-html microdata
Advanced
Performance & Caching Security & Sanitization Extending Debugging & Diagnostics
Reference
Full grammar CLI/API Browser support

vsn-html

vsn-html sets innerHTML from a scope value.

Basic usage

<div class="card" vsn-html="content"></div>
behavior .card {
  content: "<strong>Hello</strong>";
}

Trusted HTML

Use !trusted if you want behaviors inside the HTML to be parsed:

<div vsn-html!trusted="content"></div>

Only use this when you control the content.

Related

  • Trusted HTML
  • vsn-get / vsn-target / vsn-swap
On this page Basic usage Trusted HTML Related
Previous vsn-show Next vsn-get / vsn-target / vsn-swap
VSN.js - Powered by pure vibes. © 2026 vsnjs.org