@ilurk/drawer
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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()
})

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @ilurk/drawer

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

58.3 kB

Total Files

17

Last publish

Collaborators

  • hylurk