{"id":21197933,"url":"https://github.com/jonstuebe/react-text-selection","last_synced_at":"2025-07-10T05:32:17.996Z","repository":{"id":57122004,"uuid":"105698669","full_name":"jonstuebe/react-text-selection","owner":"jonstuebe","description":"Render prop callback function to provide text selection for text inputs, textarea's, etc.","archived":false,"fork":false,"pushed_at":"2017-12-20T17:08:18.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-05T14:20:05.810Z","etag":null,"topics":["component","javascript","react","reactjs","render-prop"],"latest_commit_sha":null,"homepage":"","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/jonstuebe.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}},"created_at":"2017-10-03T20:17:54.000Z","updated_at":"2020-05-06T02:24:27.000Z","dependencies_parsed_at":"2022-08-24T14:59:23.340Z","dependency_job_id":null,"html_url":"https://github.com/jonstuebe/react-text-selection","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonstuebe%2Freact-text-selection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonstuebe%2Freact-text-selection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonstuebe%2Freact-text-selection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonstuebe%2Freact-text-selection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonstuebe","download_url":"https://codeload.github.com/jonstuebe/react-text-selection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225622935,"owners_count":17498168,"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":["component","javascript","react","reactjs","render-prop"],"created_at":"2024-11-20T19:47:01.529Z","updated_at":"2024-11-20T19:47:02.647Z","avatar_url":"https://github.com/jonstuebe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Text Selection\n\nRender prop callback function to provide text selection for text inputs, textarea's, etc. _Includes UMD build_\n\n## Install\n\n```shell\nnpm i -s @jonstuebe/react-text-selection\n```\n\n## Usage\n\n```javascript\nimport React from \"react\";\nimport TextSelection from \"@jonstuebe/react-text-selection\";\n\nconst App = () =\u003e (\n  \u003cdiv\u003e\n    \u003cTextSelection\u003e\n      {({ eventProps, selectionStart, selectionEnd }) =\u003e (\n        \u003cdiv\u003e\n          \u003cp\u003e\n            {selectionStart}/{selectionEnd}\n          \u003c/p\u003e\n          \u003ctextarea className=\"form-control\" {...eventProps} /\u003e\n        \u003c/div\u003e\n      )}\n    \u003c/TextSelection\u003e\n  \u003c/div\u003e\n);\n```\n\n#### Codepen Example\n\nhttps://codepen.io/jonstuebe/pen/zpBwrL?editors=0010\n\n| [\u003cimg src=\"https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/edge.png\" alt=\"IE / Edge\" width=\"16px\" height=\"16px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eIE / Edge | [\u003cimg src=\"https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/firefox.png\" alt=\"Firefox\" width=\"16px\" height=\"16px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eFirefox | [\u003cimg src=\"https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/chrome.png\" alt=\"Chrome\" width=\"16px\" height=\"16px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eChrome | [\u003cimg src=\"https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/safari.png\" alt=\"Safari\" width=\"16px\" height=\"16px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eSafari |\n| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| IE10, IE11, Edge                                                                                                                                                                                                       | last 4 versions                                                                                                                                                                                                       | last 4 versions                                                                                                                                                                                                    | last 4 versions                                                                                                                                                                                                    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonstuebe%2Freact-text-selection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonstuebe%2Freact-text-selection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonstuebe%2Freact-text-selection/lists"}