omi-touch

2.0.0 • Public • Published

omi-touch

Smooth scrolling, rotation, pull to refresh and any motion for the web.

→ touch the mobile demo

Usage

import { render, define, WeElement } from 'omi'
import 'omi-touch'
 
define('my-app', class extends WeElement {
  onChange = value => {
    console.log(value)
  }
 
  render() {
    return (
      <div class="main">
        <omi-touch min={-1750} max={0} change={this.onChange}>
          <div class="touchArea">
            <ul>
              <li>Hello, Omi-Touch!</li>
              <li>AlloyTouch</li>
              <li>Omi</li>
              ...
              ...
              ...
              <li> row 20</li>
              <li> row 21</li>
              <li> row 22</li>
              <li> row 23</li>
              <li> row 24</li>
              <li style="border-bottom: none;"> row 25</li>
            </ul>
          </div>
        </omi-touch>
      </div>
    )
  }
})
 
render(<my-app />, 'body')

License

MIT © dntzhang

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1
    • latest

Version History

Package Sidebar

Install

npm i omi-touch

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

100 kB

Total Files

7

Last publish

Collaborators

  • yse
  • leehyunggeun
  • pasturn
  • dntzhang
  • xcatliu
  • dorsywang