{"id":20643487,"url":"https://github.com/st0ffern/react-native-textfit","last_synced_at":"2025-04-16T02:03:03.502Z","repository":{"id":57340857,"uuid":"63582447","full_name":"st0ffern/react-native-textfit","owner":"st0ffern","description":"Auto size text to fit inside a box","archived":false,"fork":false,"pushed_at":"2023-10-07T15:33:57.000Z","size":6,"stargazers_count":14,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T05:16:38.516Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/st0ffern.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-18T08:04:50.000Z","updated_at":"2019-09-16T16:40:11.000Z","dependencies_parsed_at":"2024-06-21T05:44:01.934Z","dependency_job_id":"5dd9fa78-e8d6-4741-9ba5-1b5cc31a4e6a","html_url":"https://github.com/st0ffern/react-native-textfit","commit_stats":null,"previous_names":["stoffern/react-native-textfit"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st0ffern%2Freact-native-textfit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st0ffern%2Freact-native-textfit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st0ffern%2Freact-native-textfit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st0ffern%2Freact-native-textfit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/st0ffern","download_url":"https://codeload.github.com/st0ffern/react-native-textfit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665741,"owners_count":21142123,"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-11-16T16:12:56.751Z","updated_at":"2025-04-16T02:03:03.482Z","avatar_url":"https://github.com/st0ffern.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-textfit [![version](https://img.shields.io/npm/v/react-native-textfit.svg)](https://www.npmjs.org/package/react-native-textfit)\nAuto size text to fit inside a box \n\n***This repo will be discontinued as `adjustsFontSizeToFit` was added to react-native Text elements https://github.com/facebook/react-native/pull/4026 .. Finally! :wink:***\n\n\n## Props\n\n- `children`: ***required*** Text input that should be resized\n- `width`: Maximum width of the box. (Default: auto)\n- `height`: Maximum height of the box. (Default: auto)\n- [Other React props](https://facebook.github.io/react-native/docs/text.html#props) \n\n## Installation\n\n```js\nnpm i -S react-native-textfit\n```\n\n## Usage Examples\n\n```js\nimport TextFit from \"react-native-textfit\"\n```\n\n```html\n\u003cTextFit\n  height={200}\n  width={150}\n  style={{color: 'red'}}\n  onPress={event =\u003e console.log(event)}\u003e\n  {'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'}\n\u003c/TextFit\u003e\n```\n\n## Try example\n\n```\n- git clone https://github.com/stoffern/react-native-textfit.git\n- cd react-native-textfit/example\n- npm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst0ffern%2Freact-native-textfit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fst0ffern%2Freact-native-textfit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst0ffern%2Freact-native-textfit/lists"}