
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-native-media-grid
Advanced tools
A customizable media grid component for React Native with preview support
A highly customizable, performant, and accessible media grid component for React Native applications. Display images in an elegant grid layout with support for various configurations and full-screen preview.
npm install react-native-media-grid
# or
yarn add react-native-media-grid

import { MediaGrid, type MediaItemType } from 'react-native-media-grid';
const App = () => {
const mediaItems: MediaItemType[] = [
{
url: 'https://example.com/image1.jpg',
type: 'image',
},
{
url: 'https://example.com/image2.jpg',
type: 'image',
},
// ... more items
];
return (
<MediaGrid
items={mediaItems}
spacing={2}
maxDisplayItems={4}
onMediaPress={(index) => console.log('Media pressed:', index)}
/>
);
};
| Prop | Type | Default | Description |
|---|---|---|---|
items | MediaItemType[] | Required | Array of media items to display |
spacing | number | 2 | Gap between grid items in pixels |
maxDisplayItems | number | 4 | Maximum number of items to display before showing a count overlay |
containerStyle | ViewStyle | - | Style for the grid container |
itemStyle | ViewStyle | - | Style for individual media items |
onMediaPress | (index: number) => void | - | Callback when a media item is pressed |
interface MediaItemType {
url: string;
type: 'image';
}
The component automatically adjusts its layout based on the number of items:
<MediaGrid
items={mediaItems}
containerStyle={{
borderRadius: 12,
overflow: 'hidden',
}}
itemStyle={{
borderRadius: 8,
}}
spacing={4}
/>
The component includes built-in accessibility features:
We're actively working on adding these exciting features:
Want to contribute to any of these features? Check out our contributing guidelines!
Contributions are welcome! Please read our contributing guidelines first.
MIT
If you like this project, please consider giving it a ⭐️ on GitHub!
FAQs
A customizable media grid component for React Native with preview support
We found that react-native-media-grid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.