Comments (7)
But how can I set the size of the whole slider?
If the property "sizes" is the answer, I would like to see an example of how to use this property. I have made some tries(like sizes={width:'100px'} or sizes={{width:'100px'}}) but no success so far.
from react-image-gallery.
you can override the css for the width of the images e.g.
.image-gallery-slide img {
width: 400px;
}
from react-image-gallery.
I'm not sure what you mean by this. Can you give an example?
from react-image-gallery.
I have image size: 400x300
But the gallery auto adjust the size to 266x200 like the image here: http://imgur.com/crUoaDi
I check but there is not option for setting the width, height for the gallery. So how can I set the dimension for the gallery
from react-image-gallery.
It works, thank you!
from react-image-gallery.
@Andynopol I had a similiar question, Something like this solved it for me:
.image-gallery {
width: 400px;
}
As for how to use the sizes property I had a similar intuition but it doesn't seem to work like that. As specified in the docs here you also need to specify srcset alongside sizes :
If the srcset attribute is absent, or contains no values with a width descriptor, then the sizes attribute has no effect.
If it helps you may find an explained example on how to use it here
from react-image-gallery.
Hi there!
I also wanted to control the size of the gallery, because it changed on every single picture... Is that the only way to control this?
The problem with this control is that, when I toggle the fullscreen mode, this height I defined
.image-gallery-slide img {
height: 500px;
}
is still applicable. And I would like it to be full screen.
What would be a suggestion?
from react-image-gallery.
Related Issues (20)
- how can i change thumbnail to another name HOT 1
- Mui styled HOT 1
- add virtual list HOT 6
- Unable to show images being fetched in React.useEffect(). Static images work though. HOT 1
- Disabled property for the nav buttons doesn't support RTL
- Astro Project in Vercel doesnt work HOT 1
- Can we have the state isFullscreen as property? HOT 3
- Cant see original images but see thumbnails with same link HOT 1
- Setting gallery height without impact on fullscreen mode HOT 2
- Can i use this lib with ajax?
- Request new feature - Scrollable image view HOT 1
- Sliding/changing images doesn't work with latest React client/server components and NextJS HOT 4
- can you show an example of using renderItem? HOT 1
- Replace image dynamically
- Next page animation doesn't work HOT 2
- add circular border over forward and backward slider HOT 3
- ResizeObserver loop error when resizing changes from thumbnails to bullets
- Error when importing to a custom block in WordPress block editor
- initial load breaking layout, only controls rendered, then after delay items show up causing layout shifts HOT 1
- Support props to config useSwipeable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-image-gallery.