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.

Is there a way to let CarouselProvider naturalSlideHeight to be `auto`?

See original GitHub issue

Is there a way for the CarouselProvider container be responsive to only width? Currently, the implementation requires naturalSlideWidth={%} and naturalSlideHeight={%}. Or maybe adding a property which disables the need to specify a naturalSlideHeight by defaulting to making height=auto?

The use case would be to enter text as a slide. So when you resize the window, it still shows all the text, rather than the specified naturalSlideHeight, since it would cut off some text.

I realize most people use this carousel for images, but my use case is for a testimonial slider, where resizing makes the height different when it’s responsive 😅. I haven’t been able to find an example of someone doing something like that.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:5

github_iconTop GitHub Comments

2reactions
KwanJunWencommented, Feb 8, 2020

I ended up using another npm package instead. @angryeuan

0reactions
danilo525commented, Feb 26, 2020

Same problem here, any solution for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Build an Auto-Playing Slideshow with React - Tinloof
Step 2: styling. First, let's style the parent container slideshow:.
Read more >
Pure React Carousel displaying all slides at the same time
Hello, I would like to have an automatic carousel displaying components. While testing the package out, all slides are displayed simultaneously.
Read more >
Recursive JSX Rendering of A Deeply Nested Travel Gallery
naturalSlideHeight ={125} ... The <CarouselProvider> is supplied with props of the ratio of slide width, height, ... Let's see how to solve these...
Read more >
react carousel - Code Examples & Solutions For This ...
import React from 'react'; import { CarouselProvider, Slider, Slide, ButtonBack, ... Component { render() { return ( I am the first Slide.
Read more >
How to make number of visibleSlides responsive in CSS in ...
import React, { useState, useRef } from 'react'; import { CarouselProvider, Slider, Slide } from 'pure-react-carousel'; import { ...
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