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-each

vsn-each renders a <template> for each item in a list.

Basic usage

<template id="row" vsn-each="items as item, i">
  <div class="row">
    <span class="idx" vsn-bind="i"></span>
    <span class="label" vsn-bind="item"></span>
  </div>
</template>
behavior #row {
  items: ["a", "b", "c"];
}

Notes

  • The template is cloned for each item.
  • item and i are scoped per row.

Related

  • Bindings
  • State & Scope
On this page Basic usage Notes Related
Previous vsn-get / vsn-target / vsn-swap Next Syntax reference
VSN.js - Powered by pure vibes. © 2026 vsnjs.org