{"name":"rc-input","version":"1.7.2","keywords":["react","react-component","react-input","input","antd","ant-design"],"license":"MIT","_id":"rc-input@1.7.2","maintainers":[{"name":"afc163","email":"afc163@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"}],"homepage":"https://github.com/react-component/input","bugs":{"url":"http://github.com/react-component/input/issues"},"cnpm":{"mode":"npm"},"dist":{"shasum":"a41d5ca14021475d3998deb09630ee46268610af","tarball":"http://registry-npm.ywwl.com/rc-input/download/rc-input-1.7.2.tgz","fileCount":33,"integrity":"sha512-g3nYONnl4edWj2FfVoxsU3Ec4XTE+Hb39Kfh2MFxMZjp/0gGyPUgy/v7ZhS27ZxUFNkuIDYXm9PJsLyJbtg86A==","signatures":[{"sig":"MEUCIQCnxwByf/vAwOmW3t3irF8xbdVRiSnvSEepZq4I5kIEHQIgFedW8CHUUoAd+KXK/uxmVJjvVUVM9bZMF0D0esBE+xU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73760,"size":12641,"noattachment":false,"key":"/rc-input/-/rc-input-1.7.2.tgz"},"main":"./lib/index","tnpm":{"mode":"npm"},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"types":"./lib/index.d.ts","module":"./es/index","gitHead":"1368c9ecfa83ef4bb3444c5aa5865365e69cf98c","scripts":{"lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","test":"rc-test","start":"dumi dev","compile":"father build && lessc assets/index.less assets/index.css","prepare":"husky install","coverage":"rc-test --coverage","gh-pages":"GH_PAGES=1 npm run docs:build && npm run docs:deploy","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","lint-staged":"lint-staged","postpublish":"npm run gh-pages","pretty-quick":"pretty-quick","prepublishOnly":"npm run compile && np --yolo --no-publish"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"repository":{"url":"git+ssh://git@github.com/react-component/input.git","type":"git"},"_npmVersion":"10.8.3","description":"React input component","directories":{},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write"]},"_nodeVersion":"22.8.0","dependencies":{"rc-util":"^5.18.1","classnames":"^2.2.1","@babel/runtime":"^7.11.1"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.1.0","dumi":"^2.1.14","less":"^4.2.1","husky":"^9.1.7","react":"^18.0.0","eslint":"^8.0.0","father":"^4.3.7","rc-test":"^7.0.15","gh-pages":"^6.2.0","prettier":"^3.4.2","coveralls":"^3.0.6","cross-env":"^7.0.2","react-dom":"^18.0.0","typescript":"^5.7.2","@types/jest":"^29.5.14","lint-staged":"^15.2.11","@types/react":"^19.0.0","pretty-quick":"^4.0.0","@umijs/fabric":"^4.0.0","@types/react-dom":"^19.0.1","@types/classnames":"^2.2.9","@testing-library/react":"^16.0.1","@testing-library/jest-dom":"^6.6.3","@testing-library/user-event":"^14.0.0-beta"},"peerDependencies":{"react":">=16.0.0","react-dom":">=16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rc-input_1.7.2_1735613468880_0.4536271528164275","host":"s3://npm-registry-packages-npm-production"},"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-select\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-select.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-select\n[bundlephobia-url]: https://bundlephobia.com/package/rc-select\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-select\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(<Input placeholder=\"input\" allowClear />, 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 &#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 &#124; { formatter: ({ value: string, count: number, maxLength?: number }) => 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(() => {\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<Input ref={inputRef} />\n```\n\n| Property | Type                                    | Description                       |\n| -------- | --------------------------------------- | --------------------------------- |\n| focus    | `(options?: InputFocusOptions) => void` | The input get focus when called   |\n| blur     | `() => 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","publish_time":1735613469074,"_cnpm_publish_time":1735613469074,"dist-tags":{"latest":"1.8.0"}}