flowbite-react
flowbite-react copied to clipboard
Carousel should allow enable/disable controls
Is your feature request related to a problem? Please describe. Add a prop that enables and disables entirely the < > controls either side of a carousel. I have a solution but it means that the cursor type when hovering over the 'would be control' changes.
https://user-images.githubusercontent.com/40035529/233662484-63def9a4-1502-40e8-8a3f-0c6001c4c208.mov
Describe the solution you'd like In my instance, I would like to turn off controls (The buttons either side of a carousel to allow a user to switch between images), if there's only 1 photo in the carousel.
Describe alternatives you've considered Currently I'm using this sort of logic:
const controlValue = post?.images.length > 1
? ""
: " "
return (
<Carousel leftControl={controlValue} rightControl={controlValue}>
{...}
</Carousel>
)
which works but could be cleaner?
@rluders @tulup-conner I would like to work on this feature and add a prop to carousel that completely disables left and right arrows it can be useful for mobile when you want the carousel to only be draggable if it's okey please let me to know,I will work on it.
Done! @paghar
is there no option to customize only the two next and previous rounded buttons ?