Skip to content

Latest commit

 

History

History
21 lines (19 loc) · 424 Bytes

README.md

File metadata and controls

21 lines (19 loc) · 424 Bytes

react-resize-box

import ResizeBox from 'react-resize-box';

<ResizeBox
  style={{ width: 400, height: 400 }}
  box={{ top: 10, left: 20, width: 200, height: 200 }}
>
  <img
    src="https://swiftcarrot.com/static/[email protected]"
    style={{
      width: '100%',
      height: '100%',
      objectFit: 'cover',
      userSelect: 'none',
      webkitUserDrag: 'none'
    }}
  />
</ResizeBox>;