New to KendoReactLearn about KendoReact Free.

useKendoPaste

Updated on Feb 6, 2026

A React hook that subscribes a component to smart paste events. When a SmartPasteButton dispatches a populate event, this hook will call the onValueChange callback if the event contains a value for the specified field.

The field is identified by the name or id prop of the component. Works with both KendoReact Form components and native HTML form elements.

tsx
const inputRef = React.useRef<HTMLInputElement>(null);
const [value, setValue] = React.useState('');

// Using name prop as field identifier
useKendoPaste(inputRef, {
  fieldName: 'firstName', // matches the name prop
  onValueChange: (newValue) => setValue(newValue)
});

return <input ref={inputRef} name="firstName" value={value} onChange={(e) => setValue(e.target.value)} />;

Parameters

elementRef

RefObject<"null" | Element>

A ref to the DOM element that will be used to find the event target
options

UseKendoPasteOptions

Configuration options for the smart paste subscription
Not finding the help you need?
Contact Support