{"id":20626716,"url":"https://github.com/coreprocess/unstyled-textarea-autosize","last_synced_at":"2025-09-03T02:42:15.117Z","repository":{"id":65537269,"uuid":"593947977","full_name":"coreprocess/unstyled-textarea-autosize","owner":"coreprocess","description":"An unstyled multi-line text component for React that adapts to its content.","archived":false,"fork":false,"pushed_at":"2023-03-19T13:48:56.000Z","size":41,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T01:32:52.690Z","etag":null,"topics":["autosize","component","multi-line","multiline","react","textarea","unstyled"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/coreprocess.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}},"created_at":"2023-01-27T08:15:42.000Z","updated_at":"2024-06-24T14:42:05.000Z","dependencies_parsed_at":"2023-03-25T10:01:05.215Z","dependency_job_id":null,"html_url":"https://github.com/coreprocess/unstyled-textarea-autosize","commit_stats":null,"previous_names":["teamrevin/unstyled-textarea-autosize"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Funstyled-textarea-autosize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Funstyled-textarea-autosize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Funstyled-textarea-autosize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Funstyled-textarea-autosize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreprocess","download_url":"https://codeload.github.com/coreprocess/unstyled-textarea-autosize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242483345,"owners_count":20135784,"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":["autosize","component","multi-line","multiline","react","textarea","unstyled"],"created_at":"2024-11-16T13:14:29.044Z","updated_at":"2025-03-08T00:37:38.907Z","avatar_url":"https://github.com/coreprocess.png","language":"TypeScript","readme":"# \u0026lt;UnstyledTextareaAutosize /\u0026gt;\n\n![npm version](https://badgen.net/npm/v/unstyled-textarea-autosize?icon=npm\u0026label)\n![GitHub checks](https://badgen.net/github/checks/teamrevin/unstyled-textarea-autosize/publish?icon=github\u0026label=GitHub)\n\n`\u003cUnstyledTextareaAutosize /\u003e` is an unstyled multi-line text component for React that adapts to its content.\n\n## Installation\n\nUse your favourite manager to install the [package](https://www.npmjs.com/package/unstyled-textarea-autosize):\n\n```sh\nyarn add unstyled-textarea-autosize\n```\n\n```sh\nnpm install unstyled-textarea-autosize --save\n```\n\n## Example\n\n```ts\nimport React from \"react\";\nimport { UnstyledTextareaAutosize } from \"unstyled-textarea-autosize\";\n\nexport function Example({\n    value,\n    onChange,\n}: {\n    value: string;\n    onChange: (value: string) =\u003e void;\n}) {\n    return (\n        \u003cUnstyledTextareaAutosize\n            className=\"example\"\n            value={value}\n            onValueChange={onChange}\n        /\u003e\n    );\n}\n```\n\n## Properties\n\nThe component accepts all properties of the intrinsic `div` component, including the `style` and `className` properties. In addition, it accepts the following properties:\n\n-   `readOnly?: boolean`: Content cannot be edited if set to `true`.\n-   `value?: string`: The current content value of the text component (controlled mode).\n-   `initialValue?: string`: The initial content value of the text component (uncontrolled mode).\n-   `onValueChange?: (value: string) =\u003e void`: A callback function that is called each time the user edits the content.\n\n## Attributes\n\nA reference to the component provides all attributes of the intrinsic `div` DOM element. In addition, it provides the following attribute:\n\n-   `value: string`: The current content value of the text component.\n\nPlease use the exported type `UnstyledTextareaAutosizeElement` for the reference.\n\n## License\n\nThis library is licensed under the MIT license.\n\n## Contributing\n\nWe welcome contributions to the `unstyled-textarea-autosize` library. To contribute, simply open a [pull request](https://github.com/teamrevin/unstyled-textarea-autosize/pulls) with your changes.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreprocess%2Funstyled-textarea-autosize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreprocess%2Funstyled-textarea-autosize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreprocess%2Funstyled-textarea-autosize/lists"}