#Carousel Hide 1 side of the controller Solved

1 messages · Page 1 of 1 (latest)

scenic elm
#

Hi, I want to hide the left arrow that leads to the next image if I am at the last image. and the right if I am on the first image How can I hide 1 side of the Carousel controller?

<Carousel
      slideSize="50%"
        breakpoints={[{ maxWidth: 'sm', slideSize: '50%' }]}
        h={300}
        align="start"
        withControls={temp.length > 2}
    
    >
      <Carousel.Slide>1</Carousel.Slide>
      <Carousel.Slide>2</Carousel.Slide>
      <Carousel.Slide>3</Carousel.Slide>
      {/* ...other slides */}
    </Carousel>
  );
}
scenic elm
#

Carousel Hide 1 side of the controller Solved

#

add this to the carousel

styles={{
control: {
'&[data-inactive]': {
opacity: 0,
cursor: 'default',
},
},
}}

outer quest