
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
virtual-form
Advanced tools
Create a virtual-dom form.
$ npm install virtual-form
const virtualForm = require('virtual-form')
const vel = require('vel')
vel(function (h) {
return h('form.myForm', virtualForm(h, [
'name',
'address',
{ type: 'password', name: 'passphrase' },
{ type: 'submit', value: 'Submit' }
])
})
output
<form class="myForm">
<input type="text" name="name" placeholder="name">
<input type="text" name="address" placeholder="address">
<input type="password" name="passphrase" placeholder="passphrase">
<input type="submit" value="Submit">
</form>
Create new form content. There are several types of elements that can be created:
h('form', virtualForm(h, [
'address'
]))
<form>
<input type="text" name="address" placeholder="address">
</form>
h('form', virtualForm(h, [
{ type: 'password', name: 'passphrase' }
]))
<form>
<input type="password" name="passphrase" placeholder="passphrase">
</form>
h('form', virtualForm(h, { label: true }, [
'address'
]))
<form>
<input type="text" name="address" placeholder="address">
<fieldset>
<label>address</label>
<input type="text" name="address">
</fieldset>
</form>
form element created too?Creating a flat array of inputs has a significantly simpler interface than
when a form element is also created. For instance, users might want to attach
listeners to ev-submit or set classes.
h need to be passed in?Though virtual-dom is lightweight, if every package pulls in their own
version, file size quickly grows. Instead it's better to pull in virtual-dom
once and pass references down throughout the application.
FAQs
Create a virtual-dom form
The npm package virtual-form receives a total of 3 weekly downloads. As such, virtual-form popularity was classified as not popular.
We found that virtual-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.