New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aside-drawer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aside-drawer

drawer helps to make web component like android drawer aside view.

  • 0.8.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

drawer helps to make web component like android drawer aside view.

up down left right every side drawer library.

How to Use

this is simple. first you should to hide your aside or other view by translateX or Y.

<style>
aside {
    top:0;
    left:0;
    width: 230px;
    height: 100vh;
    position: fixed;
    transform: translateX(-100%);
    background: #444;
}
</style>
<aside></aside>
const drawer = new Drawer({
    element: document.querySelector('aside')
})

Properties

changeCallback

called whenever drawer's percent degree changed. first parameter will be percent.

{
    changeCallback: (percent) => {
        console.log(percent)
    }
}

and percent is 100 or 0, it means open or close.

restoringPercentage

allowToDirectSpread

set rull that can be control open drawer by user. if it is false, user cant open drawer when drawer have been closed.

openAllowPixel

it is meaningful when property allowToUser is true. when drawer closed state, user can open the drawer within openAllowPixel degree.

Notice

changeCallback property guide

normally u dont need to match the delay with drawer. because it is unnecessary considering the performance degradation.

FAQs

Package last updated on 30 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc