0.1.0 • Published 6 years ago

te-drawer v0.1.0

Weekly downloads
2
License
GPL-2.0
Repository
github
Last release
6 years ago

te-drawer

Drawer web component

Sonar Reliability Rating Build Status

Install

npm i -S te-drawer

Usage

<te-drawer>Drawer content</te-drawer>

Attributes

AttributeTypeDescription
visiblebooleanIndication if drawer visible or not.

Methods

MethodDescription
show()Slide-in drawer.
hide()Slide-out drawer.
toggle()Slide-in/out drawer.

CSS Variables

VarDescriptionDefault
--te-drawer-overlay-colorbackground-color of the overlay element behind the drawer, covering the rest of the page.rgba(0,0,0,.5)
--te-drawer-backgroundbackground value of the drawer itself.white
--te-drawer-max-widthmax-width of the drawer. (min-width is set to 320px)360px
--te-drawer-shadowbox-shadow value of the drawer.none

Disclaimer

To fix the background and make it not scrollable this element appends/removes style properties to the body element of the document.

License

GPL-2.0 © Willi Eßer