🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-falling-drawer

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-falling-drawer

A customizable falling drawer for React Native

1.0.2
latest
Source
npm
Version published
Weekly downloads
3
-75%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-falling-drawer

Customizable falling drawer for React Native

example drawer

Installation

$ npm install react-native-falling-drawer --save

then

import React, { Component } from 'react';
import {
  Text,
} from 'react-native'
import FallingDrawer from 'react-native-falling-drawer'

const SCREENS = [
  {
    key: "profile",
    name: "Profile",
    color: "red",
    titleColor: "#fff",
    hamburgerColor: "#fff",
    render: () => <View><Text>This is profile screen</Text></View>
  }
]

  render() {
    return (
        <FallingDrawer screens={SCREENS}/>
    );
  }
}

Refer to the Example

Available props:

proptypedescriptiondefault
screensarrayAn array of sceens to switch between
headerHeightnumberHeight of the headerios: 60, android: 50
shakeDurationnumberShake effect duration in ms800
optionCollapseSpeednumberCollapse speed of the options in ms150
optionCollapseDelaynumberDelay between each option animation in ms200
diversifyAnimationsbooleanIf true, it applies bounce, shake and swing animations to the options, otherwise only shaketrue

screens:

Each screen in the screens array is an object which looks like this:

{
    key: "profile",            // unique key among all screens
    name: "Profile",           // header and option title 
    color: "red",              // header and option color
    titleColor: "#fff", 
    hamburgerColor: "#fff",
    render: () => {...}        // specifies how the screen is rendered
    customHeader: () => {...}  // custom header and option
}

License

MIT

Keywords

drawer

FAQs

Package last updated on 14 Oct 2017

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