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

138
Views
How can I add css to Lightbox?

I am using Lightbox and I want to change its default style.. I use makeStyles.

<Lightbox
  images={[{src:imageRef.current}]}
  isOpen={imgDialogOpen}
  onClose={closeImgDialog}
/>

It has a default class called content_1h4z6hc and I want to add a few more things to it like background-color.

How should I do this?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

you need to use activeProps, try please like this:

activeProps={{width: '10px'}}

or directly you can use styles

<Lightbox
    style={{ width: 10 }}
    backgroundColor="#000"
  >
    <Image
      style={{
        borderRadius: 15,
        width: "100%", 
      }}
      resizeMethod="resize"
      resizeMode="cover"
    />
  </Lightbox>
about 4 years ago · Juan Pablo Isaza Report

0

react-images-zoom-print doesn't support pass props to update css. So you can use your css to ovreride the default css.

This package using id lightboxBackdrop. So you can base on that to write your css:

#lightboxBackdrop {
  background-color: yellow;
}

https://codesandbox.io/s/inspiring-hopper-q94z7?file=/src/styles.css:59-109

about 4 years ago · Juan Pablo Isaza Report
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!