@react-native-extra/match-media
TypeScript icon, indicating that this package has built-in type declarations

0.1.10 • Public • Published

Match media


This library is a match media polyfill for react native. Note the library can be used on react native for mobile, macos and windwos because it doesnt contain any native code for a specific platform.


How to use the library


import "@react-native-extra/match-media";


const { matches } = matchMedia("(orientation: portrait)");

console.log(matches);

Media feature support


Here is all media feature support. Beside these media features will yield a false result.

  • prefers-reduced-transparency

  • prefers-reduced-motion

  • inverted-colors

  • prefers-color-scheme

  • width

  • height

  • aspect-ratio

  • orientation

  • resolution


Media type


Here is all media type support. Beside these media type will yield a false result.

  • all

  • screen

Package Sidebar

Install

npm i @react-native-extra/match-media

Weekly Downloads

0

Version

0.1.10

License

MIT

Unpacked Size

19.1 kB

Total Files

13

Last publish

Collaborators

  • yousef__abdulkarim