MCPcopy Index your code
hub / github.com/react-component/input

github.com/react-component/input @v1.8.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.8.0 ↗ · + Follow
39 symbols 89 edges 23 files 0 documented · 0% 12 cross-repo links updated 2d ago@rc-component/input@1.3.1 · 2026-05-25★ 445 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

rc-input ⌨️

NPM version npm download build status Codecov bundle size dumi

Install

rc-input

Usage

import Input from 'rc-input';
import { render } from 'react-dom';

render(<Input placeholder="input" allowClear />, mountNode);

API

Property Type Default Description
prefixCls string rc-input
className string '' additional class name of input
style React.CSSProperties style properties of input
affixWrapperClassName string - className with 'rc-input-affix-wrapper'
groupClassName string - className with 'rc-input-group-wrapper'
wrapperClassName string - className with 'rc-input-wrapper'
addonAfter ReactNode - The label text displayed after (on the right side of) the input field
addonBefore ReactNode - The label text displayed before (on the left side of) the input field
allowClear boolean | { clearIcon: ReactNode } false If allow to remove input content with clear icon
bordered boolean true Whether has border style
defaultValue string - The initial input content
disabled boolean false Whether the input is disabled
id string - The ID for input
maxLength number - The max length
showCount boolean | { formatter: ({ value: string, count: number, maxLength?: number }) => ReactNode } false Whether show text count
prefix ReactNode - The prefix icon for the Input
suffix ReactNode - The suffix icon for the Input
type string text The type of input, see: MDN( use Input.TextArea instead of type="textarea")
value string - The input content value
onChange function(e) - Callback when user input
onPressEnter function(e) - The callback function that is triggered when Enter key is pressed

inputRef

```tsx | pure const inputRef = useRef(null);

useEffect(() => { inputRef.current.focus();// the input will get focus inputRef.current.blur();// the input will lose focus console.log(inputRef.current.input);// The origin input element }, []); // ....


| Property | Type                                    | Description                       |
| -------- | --------------------------------------- | --------------------------------- |
| focus    | `(options?: InputFocusOptions) => void` | The input get focus when called   |
| blur     | `() => void`                            | The input loses focus when called |
| input    | `HTMLInputElement \| null`              | The origin input element          |



## Development

npm install npm start ```

License

rc-input is released under the MIT license.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 31
Interface 8

Languages

TypeScript100%

Modules by API surface

src/Input.tsx11 symbols
src/utils/commonUtils.ts6 symbols
src/interface.ts6 symbols
tests/BaseInput.test.tsx3 symbols
src/hooks/useCount.ts2 symbols
src/BaseInput.tsx2 symbols
docs/examples/allow-clear.tsx2 symbols
tests/index.test.tsx1 symbols
tests/focus.test.tsx1 symbols
tests/count.test.tsx1 symbols
docs/examples/show-count.tsx1 symbols
docs/examples/prefix-suffix.tsx1 symbols

For agents

$ claude mcp add input \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page