0.5.2 • Published 5 years ago

@ssaul/expandable-scrollable-drawer v0.5.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

expandable-scrollable-drawer

Expandable drawer component for React Native that supports scrollable content and can be controlled programatically.

Imgur Image

Installation

$ yarn add expandable-scrollable-drawer

or

$ npm install expandable-scrollable-drawer --save

then

import { Drawer } from 'expandable-scrollable-drawer'

Example

<Drawer 
  drawerPosition={ 'collapsed' }
  onChange={ newPosition => {} }>
  /* Content Here */
</Drawer>

Props

PropTypeDescriptionDefaultPossible Values
dismissFromFullHeightboolIf true, swiping down from the full height will dismiss the drawer. If false, swiping down from the full height will collapse the drawer.falsetrue, false
expandableboolIf true, allows the drawer to be dragged up to expand. If false, the drawer can only be dismissed.truetrue, false
drawerPositionstringsets the drawer's starting position and allows it to be controlled programatically.collapsedcollapsed, expanded, dismissed
drawerStyleobjectCustomize the drawer's background color or other style props{ }{ }
handleBarStyleobjectCustomize the handle bar's size, color, opactiy, etc.{ }{ }
onChangefuncFunction is called when the drawer's state changes()=>{ }collapsed, expanded, dismissed

Try It

Expo Snack:

https://snack.expo.io/@ssaul/expandable-drawer-with-scrollable-content