rn-swipeable-panel

by enesozturk

Zero dependency swipeable bottom panel for React Native πŸ“±

284 Stars 62 Forks Last release: about 1 month ago (1.2.1) MIT License 117 Commits 2 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

React Native Swipeable Panel

rn-swipeable-panel is a swipeable, easy to use bottom panel for your React Native projects. You can extend panel by swiping up, make it small or close by swiping down with pan gestures. Feel free to redesign inside of the panel.

npm version



βš™οΈ Installation

To install the package;

$ yarn add rn-swipeable-panel

If you use Typescript, you can install types of the rn-swipeable-panel;

$ yarn add @types/rn-swipeable-panel

βœ… It is done!

πŸš€ How to use

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

import { SwipeablePanel } from 'rn-swipeable-panel';

export default App = () => { const [panelProps, setPanelProps] = useState({ fullWidth: true, openLarge: true, showCloseButton: true, onClose: () => closePanel(), onPressCloseButton: () => closePanel(), // ...or any prop you want }); const [isPanelActive, setIsPanelActive] = useState(false);

const openPanel = () => { setIsPanelActive(true); };

const closePanel = () => { setIsPanelActive(false); };

return ( Welcome to React Native! To get started, edit App.js {/* Your Content Here */} ); };

☝️ Options


| Properties | Type | Description | Default | | ----------------------- | ---------- | -------------------------------------------------------- | ------- | | isActive |

bool
| Show/Hide the panel |
false
| | onClose |
Function
| Fired when the panel is closed | | | showCloseButton |
bool
| Set true if you want to show close button | | | fullWidth |
bool
| Set true if you want to make full with panel |
false
| | openLarge |
bool
| Set true if you want to open panel large by default |
false
| | onlyLarge |
bool
| Set true if you want to let panel open just large mode |
false
| | onlySmall |
bool
| Set true if you want to let panel open just small mode |
false
| | noBackgroundOpacity |
bool
| Set true if you want to disable black background opacity |
false
| | style |
Object
| Use this prop to override panel style |
{}
| | closeRootStyle |
Object
| Use this prop to override close button background style |
{}
| | closeIconStyle |
Object
| Use this prop to override close button icon style |
{}
| | barStyle |
Object
| Use this prop to override bar style |
{}
| | closeOnTouchOutside |
bool
| Set true if you want to close panel by touching outside |
false
| | allowTouchOutside |
bool
| Set true if you want to make toucable outside of panel |
false
| | noBar |
bool
| Set true if you want to remove gray bar |
false
|

⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

πŸ‘ Contributing

If you have any questions or requests or want to contribute to

rn-swipeable-panel
, please write the issue or give me a Pull Request freely.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.