{"id":4318,"url":"https://github.com/redpandatronicsuk/react-native-censored","last_synced_at":"2025-03-19T21:35:06.966Z","repository":{"id":57336023,"uuid":"102277414","full_name":"redpandatronicsuk/react-native-censored","owner":"redpandatronicsuk","description":"React Native component to censor content","archived":false,"fork":false,"pushed_at":"2018-07-26T21:05:58.000Z","size":1914,"stargazers_count":13,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-10T17:57:54.249Z","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/redpandatronicsuk.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-09-03T16:18:43.000Z","updated_at":"2023-03-09T04:12:05.000Z","dependencies_parsed_at":"2022-09-11T00:01:54.742Z","dependency_job_id":null,"html_url":"https://github.com/redpandatronicsuk/react-native-censored","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/redpandatronicsuk%2Freact-native-censored","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redpandatronicsuk%2Freact-native-censored/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redpandatronicsuk%2Freact-native-censored/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redpandatronicsuk%2Freact-native-censored/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redpandatronicsuk","download_url":"https://codeload.github.com/redpandatronicsuk/react-native-censored/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244508530,"owners_count":20463787,"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:08.081Z","updated_at":"2025-03-19T21:35:06.934Z","avatar_url":"https://github.com/redpandatronicsuk.png","language":"JavaScript","funding_links":[],"categories":["Components","Others"],"sub_categories":["UI"],"readme":"# react-native-censored\n`react-native-censored` is a tool for quickly censoring potentially objectionable content in your app so it conforms to the guidelines of the app market you are publishing too.\n\nThe Apple AppStore and Google PlayStore have similar - yet different - guidelines, Google's guidelines generally being more lenient. React Native apps share most (if not all) code between the iOS and Android app and it becomes hard having to manage different content. `react-native-censored` lets you easily censor content for specific platforms.\n\n## Installation\n`react-native-censored` uses [react-native-blur](https://github.com/react-native-community/react-native-blur) to achieve the blur effect and [react-native-svg](https://github.com/react-native-community/react-native-svg) to display the censored stamp. If you are using [Expo](https://expo.io/) you already have these dependencies pre-installed. If your app is not using Expo you will have to install `react-native-blur` and `react-native-svg` before you can use `react-native-censored`.\n\n## Usage\n### Example\n\n```jsx\nimport React from 'react'\nimport { Dimensions, Image, StyleSheet, Text, View } from 'react-native'\nimport { Censored } from 'react-native-censored'\n// For Expo apps use line below instead of above line:\n// import { Censored } from 'react-native-censored/expo'\n\nexport default class App extends React.Component {\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cCensored intensity={100} scale={.75} rotate=\"45deg\" fill=\"black\" platforms={['isisos']} \u003e\n          \u003cText style={styles.imageTitle}\u003eJesus Christ\u003c/Text\u003e\n          \u003cImage source={require('./assets/uncensored.jpg')} style={styles.image} /\u003e\n        \u003c/Censored\u003e\n        \u003cCensored intensity={100} scale={.75} rotate=\"45deg\" platforms={['ios', 'android']} \u003e\n          \u003cText style={styles.imageTitle}\u003eProphet Muhammad\u003c/Text\u003e\n          \u003cImage source={require('./assets/censored.jpg')} style={styles.image} /\u003e\n        \u003c/Censored\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    backgroundColor: '#fff',\n    flexDirection: 'column',\n    alignItems: 'center',\n    justifyContent: 'space-around',\n  },\n  imageTitle: {\n    color: 'black',\n    fontSize: 24,\n    textAlign: 'center'\n  },\n  image: {\n    resizeMode: 'contain',\n    maxHeight: 0.4 * Dimensions.get('window').height\n  }\n})\n```\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"demo\" title=\"demo\" src=\"https://github.com/redpandatronicsuk/react-native-censored/blob/master/demo/react-native-censor-demo.png\"/\u003e\n\u003c/p\u003e\n\n### Parameters\n| Name      | Default   | Description                                                                                                                                                                                                               |\n|-----------|-----------|-------------------------------------------------------------------------------|\n| intensity | 100       | Blur amount                                                                                                                                                                                                               |\n| tint      | 'light'   | Blur tint, either light or dark                                                                                                                                                                                           |\n| scale     | 1         | Scale factor for the censored stamp                                                                                                                                                                                       |\n| rotate    | '45deg'   | Rotation of the censored stamp                                                                                                                                                                                            |\n| fill      | '#BE1622' | Colour of the stamp                                                                                                                                                                                                       |\n| platforms | []        | The platforms the content should be censored on. For example, ['ios'] would blur the content on iOS devices, but leave it uncensored on Android devices, ['ios', 'android'] would censor it on iOS and Android platforms. |\n\n\n### Who uses react-native-censored\n## TrumpTweetTrumps\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://trumptweettrumps.com/\"\u003e\n\u003cimg alt=\"TrumpTweetTrumps\" title=\"TrumpTweetTrumps\" src=\"https://github.com/redpandatronicsuk/react-native-censored/blob/master/stuff/new-android-logo-05.png\"/\u003e\u003c/a\u003e\n\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredpandatronicsuk%2Freact-native-censored","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredpandatronicsuk%2Freact-native-censored","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredpandatronicsuk%2Freact-native-censored/lists"}