{"id":18369802,"url":"https://github.com/cawfree/react-native-uri-box","last_synced_at":"2025-04-06T18:32:31.100Z","repository":{"id":35088468,"uuid":"205184316","full_name":"cawfree/react-native-uri-box","owner":"cawfree","description":"An extendible React \u003cComponent/\u003e which will attempt to render source content consistently, based on the MIME type.","archived":false,"fork":false,"pushed_at":"2023-01-26T13:02:29.000Z","size":39,"stargazers_count":5,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T13:15:27.637Z","etag":null,"topics":["arbitrary","content","generic","react","react-native","uri"],"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/cawfree.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":"2019-08-29T14:37:44.000Z","updated_at":"2021-11-17T16:47:34.000Z","dependencies_parsed_at":"2023-02-14T17:30:48.969Z","dependency_job_id":null,"html_url":"https://github.com/cawfree/react-native-uri-box","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/cawfree%2Freact-native-uri-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-uri-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-uri-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-uri-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cawfree","download_url":"https://codeload.github.com/cawfree/react-native-uri-box/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531299,"owners_count":20953932,"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":["arbitrary","content","generic","react","react-native","uri"],"created_at":"2024-11-05T23:32:13.287Z","updated_at":"2025-04-06T18:32:28.712Z","avatar_url":"https://github.com/cawfree.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/cawfree"],"categories":[],"sub_categories":[],"readme":"# react-native-uri-box\nAn extendible React \u0026lt;Component/\u003e which will attempt to render source content consistently, based on the MIME type.\n\n## 🚀 Getting Started\n\nUsing [`npm`]():\n\n```sh\nyarn add react-native-uri-box\n```\n\nUsing [`yarn`]():\n\n```sh\nyarn add react-native-uri-box\n```\n\n## ✍️ Example\nJust use this as a drop-in component for your remote content:\n\n```javascript\nimport UriBox, { LookUpTable } from 'react-native-uri-box';\nimport Video from 'react-native-video';\n\nconst App = () =\u003e (\n  \u003cUriBox\n    style={{\n      flex: 1,\n    }}\n    source={{\n      // XXX: The content type is determined from the source.\n      uri: 'http://www.cawfree.com/mapsy/img/mapsy.jpg',\n    }}\n    lookUpTable={{\n      // XXX: The lookUpTable can be used to add support for\n      //      additional MIME types.\n      ...LookUpTable,\n      ['video/mp4']: ({ ...extraProps }) =\u003e (\n        \u003cVideo\n          {...extraProps}\n          resizeMode=\"cover\"\n          loop\n          muted\n        /\u003e\n      ),\n    }}\n  /\u003e\n);\n```\n\n## 📌 Prop Types\n\nProperty | Type | Required | Default value | Description\n:--- | :--- | :--- | :--- | :---\nComponent|custom|no|View| Defines the parent \u003cComponent/\u003e for your content. As an example, you could pass an `\u003cAnimated.View` to permit animation.\nLoadingComponent|custom|no|ActivityIndicator|What \u003cComponent /\u003e to render whilst loading.\nUnsupportedComponent|custom|no|\u0026lt;See the source code\u0026gt;|What \u003cComponent /\u003e to render if the requested MIME type is not supported.\nstyle|shape|no|styles.container| Parent component styling. The dynamic contents will be sized to fill this \u003cView/\u003e.\nsource|union|no|null|What source to render; expects an object with a single key `uri`.\nlookUpTable|shape|no|\u0026lt;See the source code\u0026gt;|Defines the table of mappings to determine which components are used for which MIME types.\n-----\n\n## ✌️ License\n[MIT](https://opensource.org/licenses/MIT)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/cawfree\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy @cawfree a coffee\" width=\"232\" height=\"50\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Freact-native-uri-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcawfree%2Freact-native-uri-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Freact-native-uri-box/lists"}