{"id":24936963,"url":"https://github.com/kiurchv/react-native-web-responsive","last_synced_at":"2025-04-10T01:13:48.057Z","repository":{"id":57341446,"uuid":"97144258","full_name":"kiurchv/react-native-web-responsive","owner":"kiurchv","description":"Universal media queries for React Native and web","archived":false,"fork":false,"pushed_at":"2017-07-26T19:10:53.000Z","size":23,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T22:42:40.593Z","etag":null,"topics":["media-query","react","react-native","responsive","web"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiurchv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-13T16:30:26.000Z","updated_at":"2021-08-26T06:27:35.000Z","dependencies_parsed_at":"2022-09-15T16:21:24.689Z","dependency_job_id":null,"html_url":"https://github.com/kiurchv/react-native-web-responsive","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiurchv%2Freact-native-web-responsive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiurchv%2Freact-native-web-responsive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiurchv%2Freact-native-web-responsive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiurchv%2Freact-native-web-responsive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiurchv","download_url":"https://codeload.github.com/kiurchv/react-native-web-responsive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247689072,"owners_count":20979790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["media-query","react","react-native","responsive","web"],"created_at":"2025-02-02T16:57:50.019Z","updated_at":"2025-04-10T01:13:48.025Z","avatar_url":"https://github.com/kiurchv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-web-responsive\n\nUniversal media queries for React Native and web.\n\n## Installation\n\nUsing npm:\n\n```sh\nnpm install --save react-native-web-responsive\n```\n\nor yarn:\n\n```sh\nyarn add react-native-web-responsive\n```\n\n## Usage\n\nSince MediaQuery component built on components from [react-responsive](https://github.com/contra/react-responsive) and [react-native-responsive](https://github.com/adbayb/react-native-responsive) it can utilize any props supported by them with next limitations:\n1. There is no difference between viewport- and device-based measurements on native.\n2. The only supported unit for the resolution property is dppx.\n3. Child function, properties `aspectRatio`, `component`, `color`, `colorIndex`, `monochrome`, `scan` and `type` are unsupported on native.\n\n### Example\n\n```jsx\nimport React from \"react\";\nimport { View, Text } from \"react-primitives\";\nimport MediaQuery from \"react-native-web-responsive\";\n\nfunction ResponsiveExample() {\n  return (\n    \u003cView\u003e\n      \u003cText\u003eDevice Test!\u003c/Text\u003e\n      \u003cMediaQuery minWidth={1224}\u003e\n        \u003cText\u003eYou are a desktop or laptop\u003c/Text\u003e\n        \u003cMediaQuery minWidth={1824}\u003e\n          \u003cText\u003eYou also have a huge screen\u003c/Text\u003e\n        \u003c/MediaQuery\u003e\n      \u003c/MediaQuery\u003e\n      \u003cMediaQuery maxWidth={1224}\u003e\n        \u003cText\u003eYou are a tablet or mobile phone\u003c/Text\u003e\n      \u003c/MediaQuery\u003e\n      \u003cMediaQuery orientation=\"portrait\"\u003e\n        \u003cText\u003eYou are portrait\u003c/Text\u003e\n      \u003c/MediaQuery\u003e\n      \u003cMediaQuery orientation=\"landscape\"\u003e\n        \u003cText\u003eYou are landscape\u003c/Text\u003e\n      \u003c/MediaQuery\u003e\n      \u003cMediaQuery minPixelRatio={2}\u003e\n        \u003cText\u003eYou are retina\u003c/Text\u003e\n      \u003c/MediaQuery\u003e\n    \u003c/View\u003e\n  );\n}\n```\n\n## License\n\n[MIT](https://github.com/kiurchv/react-native-web-responsive/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiurchv%2Freact-native-web-responsive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiurchv%2Freact-native-web-responsive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiurchv%2Freact-native-web-responsive/lists"}