
Description
react-debounce-input is a React component that renders an input, a textarea or another element, and calls your onChange handler only after the user pauses typing. It can be used as a drop-in replacement for a plain input, so existing form code keeps working. The delay is set with debounceTimeout, which defaults to 100 milliseconds, and a value of -1 turns off the automatic call so that only pressing Enter notifies you. By default, pressing Enter sends the current value straight away. The element prop lets you render a textarea or a custom React component that has value and onChange props. The minLength prop sets how short the text can become before the handler is called with an empty value. You can install it from npm or yarn, and a script tag version is also described in the README. The project has a simple web demo and a CodePen example, and its source is public on GitHub.…
Highlights
- Debounced onChange for inputs and textareas
- Drop-in replacement for a plain input
- Adjustable debounce delay, 100 ms by default
- Notify on Enter key
- Works with custom React components
Ratings & Reviews
No ratings yet
Be the first to rate react-debounce-input.
People also visit

react-autosize-textarea
replacement for built-in textarea which auto resizes itself
react-debounce-input FAQ
What does react-debounce-input do?
It wraps an input so that onChange fires after typing pauses. The delay is set by debounceTimeout and is 100 ms by default.
How do I install it?
With npm or yarn, then import the component into your React code. The README also describes a script tag version.
Can I use it for a textarea?
Yes. Set element to textarea. The README suggests setting forceNotifyByEnter to false there, so people can start new lines without triggering a notification.
Can it wrap my own component?
Yes. You can pass a custom React component as the element, as long as it works with value and onChange props.
Is it free?
The source is public on GitHub, so the project is open source.
What are the best react-debounce-input alternatives?
Popular alternatives to react-debounce-input include react-number-format, react-tagsinput and react-autosize-textarea. See all react-debounce-input alternatives

















