{"id":15492032,"url":"https://github.com/shqld/react-native-auto-expanding-webview","last_synced_at":"2025-04-22T19:26:20.944Z","repository":{"id":57335544,"uuid":"100562322","full_name":"shqld/react-native-auto-expanding-webview","owner":"shqld","description":"Auto-expanding WebView for React Native","archived":false,"fork":false,"pushed_at":"2019-09-04T15:33:42.000Z","size":38,"stargazers_count":9,"open_issues_count":4,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T10:26:17.487Z","etag":null,"topics":["android","ios","reactnative","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shqld.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-08-17T04:44:37.000Z","updated_at":"2019-02-21T16:38:16.000Z","dependencies_parsed_at":"2022-09-07T15:22:15.166Z","dependency_job_id":null,"html_url":"https://github.com/shqld/react-native-auto-expanding-webview","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/shqld%2Freact-native-auto-expanding-webview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shqld%2Freact-native-auto-expanding-webview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shqld%2Freact-native-auto-expanding-webview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shqld%2Freact-native-auto-expanding-webview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shqld","download_url":"https://codeload.github.com/shqld/react-native-auto-expanding-webview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250307680,"owners_count":21409117,"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":["android","ios","reactnative","webview"],"created_at":"2024-10-02T07:58:25.104Z","updated_at":"2025-04-22T19:26:20.919Z","avatar_url":"https://github.com/shqld.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-auto-expanding-webview\nAuto-expanding WebView for React Native\n\n## Feature\nThis can be nested in `ScrollView`\n\n### Why this?\nThis module\n- fully accepts all props of `WebView` in React Native for customizability\n- is written only in JavaScript\n\n## Requirements\nThis module has not yet been tested  \nin every version except for:\n  - `react`: `16.0.0-alpha.12`\n  - `react-native`: `0.47.1`\n\n## Installation\n```sh\n$ npm install react-native-auto-expanding-webview\n```\n\n## Props\n- `LoadingViewComponent`: `ReactClass\u003cany\u003e` | `React.Element\u003cany\u003e`\n- `onLoad`: `(contentHeight) =\u003e void`\n\n## Example\n```jsx\nimport { ScrollView, Text, ActivityIndicator, Dimensions } from 'react-native';\nimport AutoExpandingWebView from 'react-native-auto-expanding-webview';\n\nconst embedHtml = (html) =\u003e `\n  \u003c!DOCTYPE html\u003e\n  \u003chtml\u003e\n    \u003cbody\u003e${html}\u003c/body\u003e\n  \u003c/html\u003e\n`;\n\nconst Content = ({ children }) =\u003e (\n  \u003cAutoExpandingWebView\n    source={{ html: embedHtml(children) }}\n    style={{ width: Dimensions.get('screen').width }}\n    LoadingViewComponent={ActivityIndicator}\n    didLoad={contentHeight =\u003e console.log(contentHeight)}\n  /\u003e\n);\n\nconst Title = ({ children }) =\u003e (\n  \u003cText style={{ fontSize: 20, alignSelf: 'center' }}\u003e\n    { children }\n  \u003c/Text\u003e\n);\n\nconst Footer = ({ children }) =\u003e (\n  \u003cText style={{ fontSize: 20, alignSelf: 'center' }}\u003e\n    { children }\n  \u003c/Text\u003e\n);\n\nconst ArticleView = ({ article }) =\u003e (\n  \u003cScrollView contentContainerStyle={{ paddingTop: 20 }}\u003e\n    \u003cTitle\u003e{ article.title }\u003c/Title\u003e\n    \u003cContent\u003e{ article.content }\u003c/Content\u003e\n    \u003cFooter\u003e{ article.footer }\u003c/Footer\u003e\n  \u003c/ScrollView\u003e\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshqld%2Freact-native-auto-expanding-webview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshqld%2Freact-native-auto-expanding-webview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshqld%2Freact-native-auto-expanding-webview/lists"}