
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
react-native-card-modal
Advanced tools
Pure JS animated card modal, similar to google maps or many other UI interfaces out there, it is a functional component and uses hooks, so react 16.3 (or whichever version added hooks) is needed.
yarn add react-native-card-modal
Typescript is there!
Sample code:
import { CardModal } from "react-native-card-modal";
<CardModal
visible={!!selectedPin}
onClose={this.onModalClose}
scrollable
overlay
>
<Text style={{ padding: 20, fontSize: 30, fontWeight: "bold" }}>
Insert your very nice content here
</Text>
</CardModal>;
Works great with react-native-portal if you want to place stuff in front of your other UI elements
visible: boolean;
scrollable: boolean; // If scrollable you can swipe up to expand the card, an "expanded" prop is passed to the child component so you can render different content
overlay?: boolean; // Puts an overlay behind the card
onClose: () => void; // When clicking on the overlay or the function you can call inside your component
style?: StyleProp<any>;
minHeight?: number; // Small card height
maxHeight?: number; // Expanded card height
The child component inside the card will get injected 1 prop: expanded: boolean
so you can render content differently when the card is expanded
The component is very simple, if you feel like you need to add a prop open a PR and I'll promptly merge it.
FAQs
Card modal for react-native projects
The npm package react-native-card-modal receives a total of 1 weekly downloads. As such, react-native-card-modal popularity was classified as not popular.
We found that react-native-card-modal 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.