
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-backdrop
Advanced tools
Backdrop component built with Material Guidelines for React Native
React Native Backdrop component built with material guidelines for android and ios
|
|
|
$ npm install react-native-backdrop --save
import { Backdrop } from "react-native-backdrop";
const App = () => {
const [visible, setVisible] = useState(false);
const handleOpen = () => {
setVisible(true);
};
const handleClose = () => {
setVisible(false);
};
return (
<Fragment>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<TouchableOpacity
onPress={() => setVisible(true)}
style={{
width: 200,
height: 40,
justifyContent: 'center',
alignItems: 'center',
elevation: 1,
backgroundColor: '#fff',
}}>
<Text>Handle Backdrop</Text>
</TouchableOpacity>
</View>
<Backdrop
visible={visible}
handleOpen={handleOpen}
handleClose={handleClose}
onClose={() => {}}
swipeConfig={{
velocityThreshold: 0.3,
directionalOffsetThreshold: 80,
}}
animationConfig={{
speed: 14,
bounciness: 4,
}}
overlayColor="rgba(0,0,0,0.32)"
backdropStyle={{
backgroundColor: '#fff',
}}>
<View>
<Text>Backdrop Content</Text>
</View>
</Backdrop>
);
}
| Prop | Description | Default |
|---|---|---|
children | Content of backdrop (required) | |
visible | Whether the backdrop is visible (required, boolean) | false |
handleOpen | Function to open backdrop (required, function) | () => {} |
handleClose | Function to close backdrop (required, function) | () => {} |
beforeClose | Callback that is called before close animation | () => {} |
afterClose | Callback that is called after close animation | () => {} |
beforeOpen | Callback that is called before open animation | () => {} |
afterOpen | Callback that is called after open animation | () => {} |
animationConfig | Configures Open and Close Animation speed and bounciness | {speed: 14, bounciness: 4} |
swipeConfig | Configures Swipe Gesture to close backdrop | {velocityThreshold: 0.3, directionalOffsetThreshold: 80} |
backdropStyle | Style object for backdrop styling | {} |
containerStyle | Style object for container styling | { backgroundColor: "#fff" } |
overlayColor | Color of backdrop overlay | rgba(0, 0, 0, 0.32) |
header | Display custom header in backdrop | () => (<View style={styles.closePlateContainer}><View style={styles.closePlate} /></View>) |
closedHeight | Height of closed backdrop that will be visible and touchable | 0 |
closeOnBackButton | Close backdrop on back button press on android | false |
velocityThreshold - Velocity that has to be breached in order for swipe to be triggered (vx and vy properties of gestureState) directionalOffsetThreshold - Absolute offset that shouldn't be breached for swipe to be triggered (dy for horizontal swipe, dx for vertical swipe)
MIT License. © Alexander Bogdanov 2019-
FAQs
Backdrop component built with Material Guidelines for React Native
The npm package react-native-backdrop receives a total of 195 weekly downloads. As such, react-native-backdrop popularity was classified as not popular.
We found that react-native-backdrop demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.