{"id":17128268,"url":"https://github.com/scazzy/react-native-webview-autoheight","last_synced_at":"2025-04-06T03:08:30.850Z","repository":{"id":57131774,"uuid":"79782283","full_name":"scazzy/react-native-webview-autoheight","owner":"scazzy","description":"WebView which sets it's height automatically with minimal efforts","archived":false,"fork":false,"pushed_at":"2023-04-23T02:15:37.000Z","size":18,"stargazers_count":109,"open_issues_count":13,"forks_count":75,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T02:05:44.348Z","etag":null,"topics":["react-native","webview"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scazzy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-23T07:51:36.000Z","updated_at":"2024-08-10T05:09:41.000Z","dependencies_parsed_at":"2024-06-18T18:36:49.173Z","dependency_job_id":null,"html_url":"https://github.com/scazzy/react-native-webview-autoheight","commit_stats":{"total_commits":24,"total_committers":11,"mean_commits":"2.1818181818181817","dds":0.75,"last_synced_commit":"28758c60bd46053215e1fe10e54da74badb1cad1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scazzy%2Freact-native-webview-autoheight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scazzy%2Freact-native-webview-autoheight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scazzy%2Freact-native-webview-autoheight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scazzy%2Freact-native-webview-autoheight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scazzy","download_url":"https://codeload.github.com/scazzy/react-native-webview-autoheight/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937201,"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","webview"],"created_at":"2024-10-14T19:06:38.888Z","updated_at":"2025-04-06T03:08:30.830Z","avatar_url":"https://github.com/scazzy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native WebView Autoheight\nReact Native WebView which sets it's height automatically with minimal efforts.\n\nYou can also add custom CSS style or javascript to your webview using below example.\n\n\n\n![Downloads](https://nodei.co/npm/react-native-webview-autoheight.png?downloads=true\u0026stars=true)\n\n\n\n## Installation\n\u003e npm install --save react-native-webview-autoheight\n\n## Usage\n\n```\nimport MyWebView from 'react-native-webview-autoheight';\nconst customStyle = \"\u003cstyle\u003e* {max-width: 100%;} body {font-family: sans-serif;} h1 {color: red;}\u003c/style\u003e\";\nconst htmlContent = \"\u003ch1\u003eThis is title\u003c/h1\u003e\u003cp\u003eThrow your entire HTML here\u003c/p\u003e\";\n\n\u003cMyWebView\n    source={{html: customStyle + htmlContent}}\n    startInLoadingState={true}\n/\u003e\n```\n\n```\n\u003cMyWebView\n    source={{uri: 'http://example.com/helloworld.html'}}\n    startInLoadingState={true}\n/\u003e\n```\n\n\n## Props\n* Same as https://facebook.github.io/react-native/docs/webview.html#props\n* `autoHeight` (default: true)\n* `width` (default: Screen width)\n* `defaultHeight` (default height unless autoHeight)\n\n## How it works\nIt is a very simple wrapper around the built-in React Native Webview, which updates the height of the webview based on a state change using `onNavigationStateChange`.\n\n\n### Feel free to add issues or feature requests\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscazzy%2Freact-native-webview-autoheight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscazzy%2Freact-native-webview-autoheight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscazzy%2Freact-native-webview-autoheight/lists"}