@rahulrajdahal/notr-debounce-input
v0.0.2
Published
Debounce input component for notr app
Downloads
4
Maintainers
Readme
Notr Debounce Input
Debounce Input component from notr-ui
Installation
npm i @rahulrajdahal/notr-debounceInputUsage
import { useState } from "react";
import { DebounceInput } from "@rahulrajdahal/notr-debounceInput";
export default function Component() {
const [value, setValue] = useState("");
return (
<DebounceInput
value={value}
onChange={(val) => setValue(val)}
delay={800}
/>
);
}Props
| Prop | Type | Description | Default |
| -------- | ----------------- | ------------------------------------------------ | ------- |
| value | string | Value for the input | - |
| onChange | function():void | Callback function when the input changes | - |
| delay | number | delay (in ms) for the onChange function to run | 500ms |
Made with 💝 in Bhaktapur, Nepal
