preact-swipe-container

1.0.3 • Public • Published

preact-scroll-container

The component of preact

use

import SwipeContainer from 'preact-swipe-container';
...
 <SwipeContainer calss="container" currentPage="0" totalPage="4" soft={true} onChange={(num)=>{console.log(num)}}>
    <ul>
        <li>...</li>
        <li>...</li>
        <li>...</li>
        <li>...</li>
    </ul>
 </SwipeContainer>
 ...
 
.container{
    width: 100vw;
    height: 100px;
    overflow: hidden;
 
    ul{
        width: 300%;
        overflow: hidden;
 
        li{
            float: left;
            width: 100vw;
            height: 100px;
        }
    }
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.30latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i preact-swipe-container

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • wulunyi