
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-component-resizable
Advanced tools
A React component to implement cross-browser event based resize detection, without interval polling!.
var Resizable = require('react-component-resizable');
<Resizable className="via transferPropsTo" onResize={this.onResize}>
Content...
</Resizable>
npm install react-component-resizable --save
static propTypes = {
triggersClass: PropTypes.string,
expandClass : PropTypes.string,
contractClass: PropTypes.string,
embedCss : PropTypes.bool,
onResize : PropTypes.func.isRequired
}
static defaultProps = {
triggersClass: 'resize-triggers',
expandClass: 'expand-trigger',
contractClass: 'contract-trigger',
embedCss: true
}
The component will automatically embed some required style. This can be turned off using the embedCss={false} prop.
.resize-triggers {
visibility: hidden;
}
.resize-triggers, .resize-triggers > div, .contract-trigger:before {
content: " ";
display: block;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
overflow: hidden;
}
.resize-triggers > div {
overflow: auto;
}
.contract-trigger:before {
width: 200%;
height: 200%;
}
Many thanks to Daniel - backalleycoder.com for this blog post and scecima and his project javascript-detect-element-resize!
MIT
FAQs
React component to react on resize event using scroll trick
The npm package react-component-resizable receives a total of 366 weekly downloads. As such, react-component-resizable popularity was classified as not popular.
We found that react-component-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.