Gathering detailed insights and metrics for react-native-slidable-drawer-panel-updated
Gathering detailed insights and metrics for react-native-slidable-drawer-panel-updated
A react native slidable drawer package
npm install react-native-slidable-drawer-panel-updated
Typescript
Module System
Node Version
NPM Version
41.3
Supply Chain
62.3
Quality
67.9
Maintenance
50
Vulnerability
94.1
License
TypeScript (98.17%)
JavaScript (1.83%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
242
Last Day
1
Last Week
4
Last Month
36
Last Year
242
2 Stars
18 Commits
1 Branches
1 Contributors
Updated on Jun 16, 2024
Latest Version
1.0.1
Package Id
react-native-slidable-drawer-panel-updated@1.0.1
Unpacked Size
687.76 kB
Size
195.79 kB
File Count
13
NPM Version
10.5.2
Node Version
20.10.0
Published on
Jun 13, 2024
Cumulative downloads
Total Downloads
Last Day
-50%
1
Compared to previous day
Last Week
-63.6%
4
Compared to previous week
Last Month
80%
36
Compared to previous month
Last Year
0%
242
Compared to previous year
2
3
This is a updated version of package React Native Slidable Drawer Panel
React Native slidable drawer designed using react native's Animated and PanResponder APIs. Purely Typescript.
Install package by running:
npm i react-native-slidable-drawer-panel-updated
or
yarn add react-native-slidable-drawer-panel-updated
Open Source, check the bottom of this page/file for contribution guidelines.
Basic Example:
1import React, { useState } from 'react'; 2import { Button, SafeAreaView, StyleSheet } from 'react-native'; 3import SlidableDrawer from 'react-native-slidable-drawer-panel-updated'; 4 5export default function App() { 6 const [showDrawer, setShowDrawer] = useState(false); 7 const [event, setEvent] = useState('none'); 8 const closeDrawer = () => { 9 setEvent('close'); 10 }; 11 const showDrawerFn = () => { 12 setShowDrawer(true); 13 }; 14 const onSlideEnd = () => { 15 setShowDrawer(false); 16 setEvent('none'); 17 }; 18 return ( 19 <SafeAreaView style={styles.container}> 20 <Button title='Show Drawer' onPress={showDrawerFn} /> 21 {showDrawer && ( 22 <SlidableDrawer 23 onSlideEnd={onSlideEnd} 24 drawerOpenSpeed={3} 25 event={event}> 26 <Button title='Close drawer' onPress={closeDrawer} /> 27 </SlidableDrawer> 28 )} 29 </SafeAreaView> 30 ); 31} 32 33const styles = StyleSheet.create({ 34 container: { 35 flex: 1, 36 backgroundColor: '#fff', 37 alignItems: 'center', 38 justifyContent: 'center', 39 }, 40});
Property | Type | Description |
---|---|---|
onSlideEnd | Function | This gets called when the drawer finishes closing |
event | string | Value is either none or close . When the event is set to close , the drawer closes completely |
backdropColor | string | A regular react native color property value |
drawerHandleColor | string | A regular react native color property value |
useCustomDrawer | boolean | When set to true , the children of the SlidableDrawer are treated as a replacement of the default drawer. Set this to true if you want to display your custom drawer instead. Default value is false, this means the children of the SlidableDrawer are treated as contents of the drawer |
noDrawerHandle | boolean | Drawer handle isn't displayed if this is set to true |
drawerHeight | number | The value you provide gets multiplied by 100 to set the drawer height to a percentage of the device's window height. Valid values are from 0 to 0 to 1 . Default is 0.45 |
drawerBackgroundColor | string | A regular react native color property value. |
drawerOpenSpeed | number | The speed at which the drawer opens (relative to time and friction) when the component renders. Values range from 1 to 5 , 5 being the fastest. Default is 5 . |
children | React.Element | A react native component/element |
To make contributions to this project; fork and make pull requests from your fork. There is an example app in this repository to help you test your changes, whichever way feels convenient. Pull requests would be approved once they have been reviewed and determined to be aligned with the intended cause of the project.
All credits to @alishalawani. Modifications and updates made by @matheusobf
No vulnerabilities found.
No security vulnerabilities found.