npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rn-media-info-card

v1.0.0

Published

`MediaInfoCard` est un composant React Native réutilisable, conçu pour afficher un média (image, vidéo, etc.) avec un titre, un corps de texte, et des interactions configurables. Il est hautement personnalisable et réactif aux états comme le `focus` ou `h

Readme

📦 MediaInfoCard

MediaInfoCard est un composant React Native réutilisable, conçu pour afficher un média (image, vidéo, etc.) avec un titre, un corps de texte, et des interactions configurables. Il est hautement personnalisable et réactif aux états comme le focus ou hover.

✨ Fonctionnalités

  • Affichage flexible d’un média avec overlay
  • Support du mode focus avec des attributs spécifiques
  • Personnalisation poussée (alignement, taille, poids des textes, radius, etc.)
  • Comportements interactifs via useInfoCard
  • Rendu optimisé avec @legendapp/state/react et <Computed>

📦 Installation

npm install react-native
npm install @legendapp/state

🚀 Utilisation

import MediaInfoCard from './MediaInfoCard';

<MediaInfoCard
  title="Titre principal"
  body="Description brève"
  media={<Image source={require('./img.png')} style={{ width: '100%', height: '100%' }} />}
  mediaWidth={120}
  mediaHeight={120}
  mediaRadius={10}
  mainColor="#222"
  vertical
  spacing={16}
/>

🧩 Props

| Nom | Type | Description | |--------------------|--------------------------|-------------| | title | string \| ReactNode | Titre affiché | | body | string \| ReactNode | Corps du texte | | media | ReactNode | Élément média affiché | | mediaWidth | number | Largeur du média | | mediaHeight | number | Hauteur du média | | mediaRadius | number | Rayon des coins du média | | mediaBorder | number | Bordure autour du média | | mediaGap | number | Espace entre le média et les textes | | mediaOverlay | ReactNode | Élément superposé au média | | mediaSquare | boolean (default: true) | Forcer un format carré | | mainColor | string | Couleur principale utilisée | | titleSize | number | Taille du titre | | titleWeight | string \| number | Poids du titre | | titleLines | number | Limite de lignes pour le titre | | bodySize | number | Taille du corps | | bodyWeight | string \| number | Poids du corps | | bodyLines | number | Limite de lignes pour le corps | | vertical | boolean | Affichage vertical des éléments | | spacing | number (default: 12) | Espacement entre les sections | | align | "left" \| "center" \| "right" | Alignement du contenu | | justify | "flex-start" \| "center" \| "flex-end" | Justification du contenu | | fullWidth | boolean | Utiliser toute la largeur disponible | | focus | boolean | État focus (surbrillance) | | hoverable | boolean | Applique un effet de hover | | lighterHighlight | boolean | Applique un surlignage clair | | radius | number (default: 5) | Rayon des coins de la carte | | adaptWidthToMedia| boolean | Adapter la largeur du container au média | | attrsOnFocus | Partial<MediaInfoCardProps> | Props à appliquer en mode focus |

⚙️ Interactions dynamiques comme resolvePress, resolveMediaPress, etc. sont gérées via useInfoCard.

🧠 Architecture

  • components/ : composants atomiques réutilisables
  • hooks/useInfoCard.ts : logique métier et gestion des press handlers
  • MediaInfoCard.tsx : wrapper principal
  • types/MediaInfoCardProps.ts : typage des props

📄 Licence

MIT