{"id":30580582,"url":"https://github.com/react-component/input","last_synced_at":"2025-08-29T05:37:40.972Z","repository":{"id":40472079,"uuid":"460687559","full_name":"react-component/input","owner":"react-component","description":"React Input Component","archived":false,"fork":false,"pushed_at":"2025-08-05T06:50:37.000Z","size":4114,"stargazers_count":41,"open_issues_count":13,"forks_count":48,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-08T21:28:51.948Z","etag":null,"topics":["ant-design","antd","react-component"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/react-component.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2022-02-18T02:53:33.000Z","updated_at":"2025-07-15T03:24:01.000Z","dependencies_parsed_at":"2023-02-08T12:02:02.888Z","dependency_job_id":"b1f90156-a612-42a0-8e6a-569ed152d7ac","html_url":"https://github.com/react-component/input","commit_stats":{"total_commits":47,"total_committers":8,"mean_commits":5.875,"dds":"0.25531914893617025","last_synced_commit":"2a431a70e23e91d1af50515d9f595f457bdae406"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":"react-component/footer","purl":"pkg:github/react-component/input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Finput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Finput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Finput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Finput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/input/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Finput/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272636226,"owners_count":24967983,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ant-design","antd","react-component"],"created_at":"2025-08-29T05:37:40.187Z","updated_at":"2025-08-29T05:37:40.965Z","avatar_url":"https://github.com/react-component.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rc-input ⌨️\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-input.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-input\n[travis-image]: https://img.shields.io/travis/react-component/input/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/input\n[github-actions-image]: https://github.com/react-component/input/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/input/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/input/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/input\n[david-url]: https://david-dm.org/react-component/input\n[david-image]: https://david-dm.org/react-component/input/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/input?type=dev\n[david-dev-image]: https://david-dm.org/react-component/input/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-input.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-input\n[bundlephobia-url]: https://bundlephobia.com/package/rc-input\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-input\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Install\n\n[![rc-input](https://nodei.co/npm/rc-input.png)](https://npmjs.org/package/rc-input)\n\n## Usage\n\n```js\nimport Input from 'rc-input';\nimport { render } from 'react-dom';\n\nrender(\u003cInput placeholder=\"input\" allowClear /\u003e, mountNode);\n```\n\n## API\n\n| Property              | Type                                                                               | Default  | Description                                                                                                                                                         |\n| --------------------- | ---------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| prefixCls             | string                                                                             | rc-input |                                                                                                                                                                     |\n| className             | string                                                                             | ''       | additional class name of input                                                                                                                                      |\n| style                 | React.CSSProperties                                                                |          | style properties of input                                                                                                                                           |\n| affixWrapperClassName | string                                                                             | -        | className with 'rc-input-affix-wrapper'                                                                                                                             |\n| groupClassName        | string                                                                             | -        | className with 'rc-input-group-wrapper'                                                                                                                             |\n| wrapperClassName      | string                                                                             | -        | className with 'rc-input-wrapper'                                                                                                                                   |\n| addonAfter            | ReactNode                                                                          | -        | The label text displayed after (on the right side of) the input field                                                                                               |\n| addonBefore           | ReactNode                                                                          | -        | The label text displayed before (on the left side of) the input field                                                                                               |\n| allowClear            | boolean \u0026#124; { clearIcon: ReactNode }                                                                            | false    | If allow to remove input content with clear icon                                                                                                                    |\n| bordered              | boolean                                                                            | true     | Whether has border style                                                                                                                                            |\n| defaultValue          | string                                                                             | -        | The initial input content                                                                                                                                           |\n| disabled              | boolean                                                                            | false    | Whether the input is disabled                                                                                                                                       |\n| id                    | string                                                                             | -        | The ID for input                                                                                                                                                    |\n| maxLength             | number                                                                             | -        | The max length                                                                                                                                                      |\n| showCount             | boolean \u0026#124; { formatter: ({ value: string, count: number, maxLength?: number }) =\u003e ReactNode } | false    | Whether show text count                                                                                                                                             |\n| prefix                | ReactNode                                                                          | -        | The prefix icon for the Input                                                                                                                                       |\n| suffix                | ReactNode                                                                          | -        | The suffix icon for the Input                                                                                                                                       |\n| type                  | string                                                                             | `text`   | The type of input, see: [MDN](https://developer.mozilla.org/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types)( use `Input.TextArea` instead of `type=\"textarea\"`) |\n| value                 | string                                                                             | -        | The input content value                                                                                                                                             |\n| onChange              | function(e)                                                                        | -        | Callback when user input                                                                                                                                            |\n| onPressEnter          | function(e)                                                                        | -        | The callback function that is triggered when Enter key is pressed                                                                                                   |\n\n## inputRef\n\n```tsx | pure\nconst inputRef = useRef(null);\n\nuseEffect(() =\u003e {\n  inputRef.current.focus();// the input will get focus\n  inputRef.current.blur();// the input will lose focus\n  console.log(inputRef.current.input);// The origin input element\n}, []);\n// ....\n\u003cInput ref={inputRef} /\u003e\n```\n\n| Property | Type                                    | Description                       |\n| -------- | --------------------------------------- | --------------------------------- |\n| focus    | `(options?: InputFocusOptions) =\u003e void` | The input get focus when called   |\n| blur     | `() =\u003e void`                            | The input loses focus when called |\n| input    | `HTMLInputElement \\| null`              | The origin input element          |\n\n\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## License\n\nrc-input is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Finput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Finput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Finput/lists"}