JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q54790F
  • License MIT

instant interactivity for the web

Package Exports

  • @voxjs/vox

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@voxjs/vox) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vox.js

⚑️ INSTANT INTERACTIVITY FOR THE WEB πŸ’«

Vox is a tiny (≈7KB) JavaScript library that allows you to enhance your HTML with declarative two-way data bindings, using simple, native-like attributes (directives).


<script src="vox.min.js"></script>

<div vox="{ world: [ '🌏', '🌍', '🌎' ] }">
  hello, <span vox:text="world.join(' ')"></span>!
  <br/>
  <button vox:onclick.once="world.push('πŸ‘½')">
    click...
  </button>
</div>

<script>
  const app = vox();
  app.init();
  // ...that's all, folks!
  app.exit();
</script>

DOCUMENTATION

HOME
INSTALLATION
MAIN CONCEPTS
API REFERENCE
SHOPIFY
RESOURCES

demo or it didn't happen.

πŸ”— <**counter**/>

<div vox="{ count: 0 }">
  <button vox:onclick="(count--)">
    &minus;
  </button>
  <span vox:text="(count)"></span>
  <button vox:onclick="(count++)">
    &plus;
  </button>
</div>

πŸ”— <**dialog**/>

<div vox="{ open: false }">
  <button vox:onclick="(open=!open)">
    click
  </button>
  <div vox:if="(open)">
    hi! πŸ‘‹
  </div>
</div>

πŸ”— <**to-dos**/>

<div vox="{ todos: [ 'β˜•οΈ', 'πŸ’»', 'πŸ’€' ] }">
  <ol vox:if="(todos.length > 0)">
    <li vox:for="(todo in todos)">
      <span vox:text="(todo)"></span>
      <button vox:onclick="{
        todos.splice(todos.indexOf(todo), 1);
      }">
        &times;
      </button>
    </li>
  </ol>
  <form vox:onsubmit.prevent="{
    todos.push(els.input.value);
    els.input.value = '';
  }">
    <input vox:is="('input')"/>
  </form>
</div>

COPYRIGHT © 2021 PAULA GRIGUΘšΔ‚ AND CONTRIBUTORS