question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting height to the image slider

See original GitHub issue

I am trying to set a height to the slider.

I tried to figure out what exactly is the cause of the problem, but I can’t help. I have tried multiple ways.

Example of the code:

<ImageSlider
    style={{width: 360, height: 270}}
    images={images}
/>

simulator screen shot - iphone 8 - 2018-02-10 at 18 36 17

I have also tryed:

<ImageSlider
    images={images}
    customSlide={({ index, item, style, width }) => (
        <Image source={{ uri: item }} style={{width: 360, height: 270}} />
    )}
/>

simulator screen shot - iphone 8 - 2018-02-10 at 18 30 17

And also:

<ImageSlider
    style={{width: 360, height: 270}}
    images={images}
    customSlide={({ index, item, style, width }) => (
        <Image source={{ uri: item }} style={{width: 360, height: 270}} />
    )}
/>

simulator screen shot - iphone 8 - 2018-02-10 at 18 35 58

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
vranjeslukacommented, Feb 10, 2018

With the new update and flex: 0 it works. Thank you!

0reactions
ArtiomShapovalovcommented, Feb 10, 2018

All right I got it. Could you try to pass flex: 0 with your style prop?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reduce the height of the Slider - Press Customizr
Customizr introduced built-in feature changes in v3.3. Go to Customize>Content>Front Page. Adjust the Set slider's height in pixels setting.
Read more >
How to set heights of each image inside a slider to fill the rest ...
2 Answers 2 · get carousel inner height (carouselHeight) · calculate how much space left (under the h1 and p) leftSpace = (carouselHeight...
Read more >
Elementor: How to adjust the slider and image height
Elementor allows you three options to adjust your slider height: either PX, ... It's safest to set your slider height to the same...
Read more >
Slider settings - Size - Smart Slider Documentation - Help Scout
Slider settings - Size. The Size tab is located at the Slider settings page. Slider Size. Width, Height. They set size of the...
Read more >
change height slider | WordPress.org
hi, i want to reduce the heigh of my slider i don't see in setting and i try ... First, the height is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found