Resize handler for textarea or any given element. Supports Internet Explorer, Edge, Firefox, Chrome, Safari etc.
- copy
lib/*
ornpm install --save resize-polyfill
- apply Reverse engineering to demo.html :-)
It's trivial to integrate with react:
import resizePolyfill from 'resize-polyfill';
class MyComponent {
render (
<textarea ref={(el) => {
if (el) {
resizePolyfill(el, true);
}
}}>
</textarea>
)
}
- There are no many alternatives. I found just Resizable as a part of jQuery UI.
- It's really small (9.15KB uncompressed)