themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.82k stars 406 forks source link

feat(carousel): automatic hiding of navigation buttons when the first… #1207

Open cristiantiradob opened 7 months ago

cristiantiradob commented 7 months ago

feat(carousel): automatic hiding of navigation buttons when the first or last image is active

Added 'autoHideControls' feature to ImageSlider for intuitive navigation button visibility.

Gives a nice touch for UX when not needing to move from last image to first one. Conditional rendering of carousel controls when autoHideControls is true.

https://github.com/themesberg/flowbite-react/assets/36115659/87521d58-b0b4-4d34-bd78-d59b950d10a7

fixes #1205

New optional prop added to Carousel component: autoHideControls with false as default value. Example:

Captura de pantalla 2023-12-31 a la(s) 4 34 23 p m
vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2024 2:35am
codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (7461173) 99.54% compared to head (5354f6b) 97.35%. Report is 184 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1207 +/- ## ========================================== - Coverage 99.54% 97.35% -2.19% ========================================== Files 163 214 +51 Lines 6621 9089 +2468 Branches 401 532 +131 ========================================== + Hits 6591 8849 +2258 - Misses 30 240 +210 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tulup-conner commented 7 months ago

Thank you for contributing! I like this idea and solution a lot, but like you said, it's not in the vanilla library so we probably shouldn't add it. @zoltanszogyenyi What do you think here? This PR looks good if we want it.