{"id":15571179,"url":"https://github.com/m0ngr31/react-native-device-detection","last_synced_at":"2026-03-08T17:39:21.075Z","repository":{"id":57336505,"uuid":"53885704","full_name":"m0ngr31/react-native-device-detection","owner":"m0ngr31","description":null,"archived":false,"fork":false,"pushed_at":"2020-01-16T18:28:38.000Z","size":14,"stargazers_count":59,"open_issues_count":4,"forks_count":19,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-23T07:23:52.821Z","etag":null,"topics":["react-native"],"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/m0ngr31.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-14T19:30:37.000Z","updated_at":"2023-01-17T00:04:20.000Z","dependencies_parsed_at":"2022-09-03T08:01:17.343Z","dependency_job_id":null,"html_url":"https://github.com/m0ngr31/react-native-device-detection","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m0ngr31%2Freact-native-device-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m0ngr31%2Freact-native-device-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m0ngr31%2Freact-native-device-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m0ngr31%2Freact-native-device-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m0ngr31","download_url":"https://codeload.github.com/m0ngr31/react-native-device-detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231800773,"owners_count":18428569,"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":["react-native"],"created_at":"2024-10-02T17:56:05.658Z","updated_at":"2026-03-08T17:39:21.050Z","avatar_url":"https://github.com/m0ngr31.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"react-native-device-detection\n======\nAbout\n------------------------\nThe class was written to simplify the process of determining what platform was currently running to easily change Styles or JSX as needed.\n\nInstall\n------------------------\n`npm install react-native-device-detection --save`\n\nUsage\n------------------------\n\nImport into a project file: \n\nRequire Import: `const Device = require('react-native-device-detection');`\n\nES6 Modules: `import { isAndroid } from 'react-native-device-detection`;\n\nThen you can make changes to your StyleSheet like so:\n```\nif(Device.isIos) {\n  Object.assign(styles, {\n    ...\n  });\n}\n```\nor\n```\nif(Device.isTablet) {\n  Object.assign(styles, {\n    ...\n  });\n}\n```\n\nYou can also use it anywhere else in your code where you need to differentiate between platforms.\n\nAvailable props:\n\n - pixelDensity\n - width\n - height\n - isIos\n - isAndroid\n - isPhone\n - isTablet\n - isIphoneX","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm0ngr31%2Freact-native-device-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm0ngr31%2Freact-native-device-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm0ngr31%2Freact-native-device-detection/lists"}