• Stars
    star
    970
  • Rank 47,174 (Top 1.0 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Zero dependency swipeable bottom panel for React Native ๐Ÿ“ฑ

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

โœ… 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 (
    <View style={styles.container}>
      <Text style={styles.welcome}>Welcome to React Native!</Text>
      <Text style={styles.instructions}>To get started, edit App.js</Text>
      <SwipeablePanel {...panelProps} isActive={isPanelActive}>
        <PanelContent /> {/* Your Content Here */}
      </SwipeablePanel>
    </View>
  );
};

โ˜๏ธ 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 {}
smallPanelHeight Object Use this prop to override the small panel default height
barContainerStyle Object Use this prop to override bar container 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
scrollViewProps Object Use this prop to override scroll view that inside the panel {}

โญ๏ธ 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.

More Repositories

1

react-native-hold-menu

๐Ÿ“ฑ A performant, easy to use hold to open context menu for React Native powered by Reanimated ๐Ÿš€
TypeScript
1,407
star
2

json-data-ai-template

JSONDataAI.com template with Next.js 13 and Vercel AI SDK
TypeScript
570
star
3

react-native-ios

iOS UI implementation in React Native with gestures and animations ๐Ÿ
TypeScript
361
star
4

react-native-instagram

Instagram iOS page transitions implementation with FlashList and Reanimated
TypeScript
313
star
5

awesome-course

Create awesome courses that let your audience learn by coding โŒจ๏ธ
TypeScript
254
star
6

sticker-store

E-commerce website powered with Next.js.
TypeScript
40
star
7

hyper-rename-tab

Hyper plugin to rename your tabs
JavaScript
29
star
8

chatectron

Web socket implementation with Socket.io & Electron & React JS ๐Ÿ’ฌ ๐Ÿ–ฅ
JavaScript
17
star
9

website

โšช๏ธ My personal website with Next JS, & Tailwind
TypeScript
15
star
10

myrteal

13
star
11

tcdd-bilet-bul

TCDD รผzerinde sefer sorgusu yapฤฑp telefonunuza bildirim gรถnderen Python Scripti ๐Ÿš‚
Python
12
star
12

react-native-onesignal-example

This is an example project for OneSignal push notification setup
JavaScript
9
star
13

solito-nativewind

Example setup with Solito & Nativewind
TypeScript
8
star
14

react-native-jsi-example

Example React Native library written with JSI
Java
8
star
15

nextjs-page-transitions

Page transition example with React Spring on Next Js application
JavaScript
6
star
16

react-native-hold-menu-expo-example

Showcase project for React Native Hold Menu with Expo ๐Ÿ”ฅ
TypeScript
5
star
17

solidity-playground

My playground repo for learning Solidity with CryptoZombies
Solidity
4
star
18

react-native-reanimated-playground

My playground repo for creating animations with Reanimated v1.
TypeScript
3
star
19

rick-and-morty

Example app with Rick and Morty API including Snapshot & Unit tests
TypeScript
2
star
20

deploy-next-to-x

Guides to deploy your Next JS apps ๐Ÿ“˜
1
star
21

DesignPatterns

Gang of four design patterns with samples
C#
1
star
22

nft-react-goerli-test

CSS
1
star
23

swift-apollo-image-upload

Example app to upload
Swift
1
star
24

enesozturk

1
star