react-slide-out
Simple lightweight (<2kb) animated slider component.
Usability
and include css file
Usage
After you imported libs, somewhere in your component's code:
props/options
isOpen
If passed slider will be render with slide-in animation
onOutsideClick
It will fire a function if passed when user clicks on "modalWrapper area" (dimmed area)
title
If passed title will be rendered in header wrapper
footer
If passed footer will be rendered
verticalOffset
If passed slider and slider wrapper will be offset from top or bottom (e.g. useful when you have navigation/bottom bar and you don't want slider to render on top of it)
foldMode
If passed slider will be enter a "fold" mode, where instead of closing it will fold to certain width(140px default). Note: isOpen and onOutsideClick props will do nothing in this mode and
isFolded
Only works if in fold mode, obviously. Will fold modal to specified width or unfold it to natural width(default false)
foldWidth
Only works if in fold mode, represents the width modal will take if isFolded prop is set to true
Example project
Clone/download the repo followed by npm (i) install && npm start, so you can check this superior component in local. If you have any comment, suggestion, issue, please report it, as I will try to keep this component alive.