1.0.1 • Published 8 years ago

yo-yo-autogrow v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

yo-yo-autogrow

npm API stability MIT Licensed

Wrapper <textarea /> UI Component made from yo-yo

capture

Usage

const autogrow = require('yo-yo-autogrow')

const el = yo`<div>
  ${autogrow({
    required: true,
    placeholder: 'enter...'
  })}
</div>`

with Choo

const choo = require('choo')
const html = require('choo/html')
const autogrow = require('yo-yo-autogrow')

const app = choo()

app.model({
  state: {title: 'Sample with choo'}
})

const mainView = (state) => html`
  <main>
    <div>
      <h1>${state.title}</h1>
      <form>
        ${autogrow()}
      </form>
    </div>
  </main>
`

document.body.appendChild(tree)

Properties

PropertyDefault
placeholder''
value''
name''
disabledfalse
requiredfalse
inputmode''
autocomplete'off'

Style

PropertyDefault
--AutogrowTextarea-border1px solid #ddd
--AutogrowTextarea-border-focus1px solid #9cc
--AutogrowTextarea-width100%
--AutogrowTextarea-padding4px 6px
1.0.1

8 years ago

1.0.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago