
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-crop-comp
Advanced tools
[](https://badge.fury.io/js/react-crop-component) 
<div id='crop-portal'></div>
//ComponentToBeCrop.js
const ComponentToBeCrop = () => (
<div
style={{
width: 250,
height: 250,
backgroundColor: '#ff44d9',
color: '#fff',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
Crop me if you can
</div>
)
// App.js
import React from 'react'
import ComponentToBeCrop from './ComponentToBeCrop'
import CropComponent from 'react-crop-component'
const MyApp = ()=> (
<>
<ComponentToBeCrop />
<CropComponent
portalId='crop-portal'
canvasConfigs={{
width: 250,
height: 250,
innerWidth: 250,
innerHeight: 250,
}}
Component={ComponentToBeCrop}
/>
</>)
export const MyApp
type defaultValueobject{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
}
object{
position: 'fixed',
left: 0,
top: 0,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'column',
bottom: 0,
right: 0,
background: 'rgba(49, 73, 177, 0.5)',
zIndex: 9999,
}
string canvas-portalReactElement nullobject nullobject nullobject{
padding: 8,
margin: 8,
background: '#273CAF',
color: '#fff',
border: 'none',
outline: 'none',
}
string 'download.png'object{
padding: 8,
margin: 8,
background: '#36C2CE',
color: '#fff',
}
function({ canvasElement, #### onClick }) => (
<a
onClick={onClick}
href={canvasElement && canvasElement.toDataURL()}
download={filename}
style={downloadStyle}
>
DOWNLOAD
</a>
)
function;({ onClick }) => (
<button style={buttonStyle} onClick={onClick}>
CANCEL
</button>
)
function;({ onClick }) => (
<button style={buttonStyle} onClick={onClick}>
Crop Component
</button>
)
Dependency html2canvas
This project was bootstrapped with Create React App.
In the project directory, you can run:
npm startdevelopment env
npm run buildproduction script
npm run npmbuildcreates node_module output file
FAQs
[](https://badge.fury.io/js/react-crop-component) 
We found that react-crop-comp 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.