Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-native-simple-drawer with all npm packages installed. Try it out:

require("react-native/package.json"); // react-native is a peer dependency. var reactNativeSimpleDrawer = require("react-native-simple-drawer")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-native-simple-drawer v0.4.5

Simple side menu with gestures and extendable animations

*** Required Props ***

  • menu: The menu component

*** Optional Props (See ./example for usage) ***

  • targetOffset: How far from the edge before responding to gestures
  • disableGestures: disable swipe to show/hide
  • onChange:(isOpen)=>{}
  • direction: "left" or "right"
  • style: The style of the menu
  • width: The width of the menu
  • value: Optional Animated.Value(0) used to link animations inline with menu

*** Functions ***

  • ref.close()

Minimal Example

import SideMenu = from 'react-native-simple-drawer';
    render() {
        const menu = (
            <View style={{padding:10}}>
        return (
                    <TouchableOpacity onPress={() =>}>
                        <Text>Toggle Menu</Text>
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free