{"id":4128,"url":"https://github.com/jmstout/react-native-viewport-units","last_synced_at":"2025-07-17T05:43:08.403Z","repository":{"id":29885024,"uuid":"33430404","full_name":"jmstout/react-native-viewport-units","owner":"jmstout","description":"Incredibly simple utility for (sort of) using viewport units with React Native.","archived":false,"fork":false,"pushed_at":"2015-11-18T18:43:41.000Z","size":141,"stargazers_count":158,"open_issues_count":2,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T15:40:11.686Z","etag":null,"topics":[],"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/jmstout.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":"2015-04-05T04:36:55.000Z","updated_at":"2024-08-13T18:56:13.000Z","dependencies_parsed_at":"2022-08-03T15:20:21.258Z","dependency_job_id":null,"html_url":"https://github.com/jmstout/react-native-viewport-units","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/jmstout%2Freact-native-viewport-units","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmstout%2Freact-native-viewport-units/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmstout%2Freact-native-viewport-units/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmstout%2Freact-native-viewport-units/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmstout","download_url":"https://codeload.github.com/jmstout/react-native-viewport-units/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161274,"owners_count":21057555,"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":[],"created_at":"2024-01-05T20:17:01.958Z","updated_at":"2025-04-10T05:10:37.373Z","avatar_url":"https://github.com/jmstout.png","language":"JavaScript","funding_links":[],"categories":["Components","JavaScript","Others"],"sub_categories":["UI"],"readme":"# react-native-viewport-units\nIncredibly simple utility for (sort of) using viewport units with [React Native](https://github.com/facebook/react-native).\n\n## Install\n```sh\n$ npm install react-native-viewport-units --save\n```\n\n## Usage\n```javascript\nvar {vw, vh, vmin, vmax} = require('react-native-viewport-units');\n```\n\nNotice the required operator/syntax: __x * vw__\n```javascript\n\u003cView style={{height:50*vh, width:50*vw}}/\u003e\n```\n\n```javascript\nvar styles = StyleSheet.create({\n  lookingGood: {\n    width: 15*vmin,\n    height: 10*vmax,\n    padding: 2*vw,\n    margin: 4*vh,\n  }\n});\n```\n\n## Roadmap\nI would like to add support for orientation changes and reflowing components that use viewport units. I am, however, waiting until something official lands. Keeping a close eye on [418](https://github.com/facebook/react-native/pull/418).\n\n## License\nMIT © [Jeff Stout](http://jmstout.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmstout%2Freact-native-viewport-units","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmstout%2Freact-native-viewport-units","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmstout%2Freact-native-viewport-units/lists"}