hg-input

1.0.3 • Public • Published

Mercury (hg) HyperScript Input Control

build status

This is a pure hyperscript input control that uses a short syntax for setting the name, id and any classes you would like to add to the input control

Usage

var input = require('hg-input')

function render() {
  return h('form', { 'ev-submit': hg.sendSubmit(state.channels.submit)}, [
    input('name.u-full-width'),
    input('email.u-full-width', { type: 'email' }),
    input('password.u-full-width', { type: 'password' }),
    h('button', 'Register')
  ])
}

install

npm i hg-input

Package Sidebar

Install

npm i hg-input

Weekly Downloads

2

Version

1.0.3

License

MIT

Last publish

Collaborators

  • twilson63