@ilurk/drawer
v0.0.2
Published
A cascaded drawer UI component for mobile.
Downloads
4
Readme
drawer
English | 简体中文
A cascaded drawer UI component for mobile.
Installation
npm install @lurk/drawer
or
yarn add @lurk/drawer
Demo
You can use it like this :
html
<body>
<div id="wrapper"></div>
<button id="btn">
Click Me
</button>
</body>
js
import '@lurk/drawer/dist/css/drawer.min.css'
import Drawer from '@lurk/drawer'
const drawer = new Drawer({
wrapper: '#wrapper',
levels: [
{
title: 'Choose Province',
},
{
title: 'Choose City',
},
{
title: 'Choose County',
}
]
})
document.querySelector('#btn').addEventListener('click', function () {
drawer.show()
})