{"id":18369853,"url":"https://github.com/cawfree/react-native-twitter-textview","last_synced_at":"2025-06-23T03:43:31.260Z","repository":{"id":35055739,"uuid":"201394335","full_name":"cawfree/react-native-twitter-textview","owner":"cawfree","description":"A \u003cTextView/\u003e component for React Native built on top of twitter-text linkification.","archived":false,"fork":false,"pushed_at":"2023-01-06T11:46:39.000Z","size":2786,"stargazers_count":76,"open_issues_count":37,"forks_count":21,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T13:15:16.500Z","etag":null,"topics":["hashtags","link","mention","react","react-native","rn","tags","twitter"],"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-09T05:13:32.000Z","updated_at":"2024-11-17T01:56:06.000Z","dependencies_parsed_at":"2023-01-15T13:01:16.204Z","dependency_job_id":null,"html_url":"https://github.com/cawfree/react-native-twitter-textview","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-twitter-textview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-twitter-textview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-twitter-textview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-twitter-textview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cawfree","download_url":"https://codeload.github.com/cawfree/react-native-twitter-textview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531340,"owners_count":20953937,"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":["hashtags","link","mention","react","react-native","rn","tags","twitter"],"created_at":"2024-11-05T23:32:37.435Z","updated_at":"2025-04-06T18:32:33.706Z","avatar_url":"https://github.com/cawfree.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/cawfree"],"categories":[],"sub_categories":[],"readme":"# react-native-twitter-textview\nA `\u003cText/\u003e` component for [React Native](https://facebook.github.io/react-native) and [React Native Web](https://github.com/necolas/react-native-web) that automatically detects **#hashtags** and **@mentions**.\n\n\u003ca href=\"#badge\"\u003e\u003cimg alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"\u003e\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./bin/out.gif\" width=\"600\" height=\"164\"\u003e\n\u003c/p\u003e\n\n## 🚀 Getting Started\nUsing [`npm`](https://www.npmjs.com/package/react-native-twitter-textview):\n\n```\nnpm install --save react-native-twitter-textview\n```\n\nUsing [`yarn`](https://www.npmjs.com/package/react-native-twitter-textview):\n\n```\nyarn add react-native-twitter-textview\n```\n\n## ✍️ Usage\nIt's super easy; just replace your React Native [`\u003cText /\u003e`](https://facebook.github.io/react-native/docs/text.html) component with a [`\u003cTwitterTextView /\u003e`](./TwitterText/src/components/TwitterTextView), and there you go!\n\n```javascript\nconst App = () =\u003e {\n  const [value, onChangeText] = useState('');\n  return (\n    \u003cView\n      style={StyleSheet.absoluteFill}\n    \u003e\n      \u003cTextInput\n        onChangeText={onChangeText}\n        value={value}\n        placeholder=\"Type some #hashtags or @mentions to get started.\"\n        multiline\n        numberOfLines={4}\n      /\u003e\n      \u003cTwitterTextView\n        style={styles.twitterTextView}\n        hashtagStyle={styles.hashtagStyle}\n        mentionStyle={styles.mentionStyle}\n        linkStyle={styles.linkStyle}\n        emailStyle={styles.emailStyle}\n      \u003e\n        {value}\n      \u003c/TwitterTextView\u003e\n    \u003c/View\u003e\n  );\n}\n```\n\n## ✍️ Input\n\nAre you looking for a similar component for tagged `\u003cTextInput/\u003e`? If so, please check out [**react-native-segmented-text-input**](https://github.com/cawfree/react-native-segmented-text-input).\n\n## 📋 Props\n-----\nProp                  | Type     | Default                   | Required | Description\n--------------------- | -------- | ------------------------- | -------- | -----------\nchildren|string|''|No|The text to render.\nextractHashtags|bool|true|No|Whether you wish to support hashtags.\nonPressHashtag|func|(e, hashtag) =\u003e null|No|Called when a detected hashtag is clicked.\nhashtagStyle|shape[object Object]|styles.linkStyle|No|Hashtag style.\nextractMentions|bool|true|No|Whether you wish to support mentions.\nonPressMention|func|(e, hashtag) =\u003e null|No|Called when a detected mention is clicked.\nmentionStyle|shape[object Object]|styles.linkStyle|No|Mention style.\nextractLinks|bool|true|No|Whether you wish to support links.\nonPressLink|func|(e, link) =\u003e Linking.openURL(link)|No|Called when a detected link is clicked.\nlinkStyle|shape[object Object]|styles.linkStyle|No|Link style.\nextractEmails|bool|true|No|Whether you wish to support emails.\nonPressEmail|func|(e, link) =\u003e Linking.openURL(link)|No|Called when a detected email is clicked.\nemailStyle|shape[object Object]|styles.linkStyle|No|Email style.\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-twitter-textview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcawfree%2Freact-native-twitter-textview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Freact-native-twitter-textview/lists"}