
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-make-resizable
Advanced tools
npm i --save react-make-resizable
import { Resizable, Resizer } from 'react-make-resizable';
return (
<Resizable
onResizeStart={e => console.log(e)}
onResizeDrag={(e, ({ width, height }), position) => console.log(e, width, height, position)}
onResizeEnd={(e, ({ width, height }), position) => console.log(e, width, height, position)}
>
<div class="my-resizable-element">
Resizable Box
<Resizer position="top" />
<Resizer position="right" />
<Resizer position="bottom" />
<Resizer position="left" />
</div>
</Resizable>
);
Using makeResizable to wrap your component will remove the need to use Resizable, and automatically handle the onResize* props without you having to pass them through yourself.
import { makeResizable, Resizer } from 'react-make-resizable';
class ResizableBox extends React.Component {
render() {
<div class="my-resizable-element">
Resizable Box
<Resizer position="top" />
<Resizer position="right" />
<Resizer position="bottom" />
<Resizer position="left" />
</div>
}
}
export default makeResizable(ResizableBox);
This component adds nothing to the DOM, but must wrap the element that needs to be resizable. It takes the following props:
Called when the element starts being resized, with the mouse event
Called on each update (i.e. when the mouse moves) with the mouse event, current bounding rectangle and the side being dragged
Called when the resize ends with the mouse event, final bounding rectangle of the element and the side which was being dragged
Components returned by this HOC take the same props as Resizable, any other props will be passed to the wrapped component.
This component is used to make a side of the element resizable. You can make any side of the element resizable or not resizable. You can pass an as prop to render Resizer as a certain element or component. You can also style it.
The position prop must be present and be one of top, right, bottom, left
FAQs
Component to make any HTML element resizable
We found that react-make-resizable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.