Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
React image crop: How to set image to full screen?

I am trying to set an image that is displayed by the ReactCrop component to full screen (size of the window). The image is full size on some screens (Galaxy S5 emulator) but doesn't work on others (Iphone emulator). I am able to set the image to full screen when it's not in the ReactCrop component, but it doesn't work with React Crop. This is my code:

<ReactCrop
  src={src}
  style={{width: "100%", height: "100%", position: "absolute", left: "50%", marginLeft: "-50%", objectFit: "cover", objectPosition: "center"}}
  crop={crop}
  onImageLoaded={this.onImageLoaded}
  onComplete={this.onCropComplete}
  onChange={this.onCropChange}
/>

Here is a sandbox of my project: https://codesandbox.io/s/8to8e?file=/src/App.js How could I set the image to full screen?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!