flickity icon indicating copy to clipboard operation
flickity copied to clipboard

Hide arrows when all items fit viewport

Open JasonTheAdams opened this issue 6 years ago • 3 comments

It would be really handy to have an option wherein the arrows disappear entirely when all the items fit within the viewable area. This would tentatively change depending on if the screen is resized.

Currently it's possible to hide the arrows based on the disabled attribute, but this isn't a good fit as we want the arrows when the area is scrollable.

Our use case is that we often aren't sure how many items are going to be within the flickity area, and some times aren't sure on the size — so it's possible two items may fit just fine. In these cases, it's odd to encourage scrolling as it doesn't really do anything. Support was added for >1 for draggable, which is great, but it still has the arrows and dots. In this scenario we often don't want it to appear to be anything special — no arrows, dots, anything that suggests it could be scrollable.

Thanks for such an awesome product! We use it quite often!

JasonTheAdams avatar Sep 04 '18 17:09 JasonTheAdams

Thanks for this feature request. Add a 👍 reaction to this issue if you would like to see this feature added. Do not add +1 comments — They will be deleted.


Currently, the most straightforward way to implement this feature is to enable groupCells. If there's only one group, no prev/next buttons will be enabled.

desandro avatar Sep 11 '18 01:09 desandro

@desandro Thanks! Would you mind tagging it with Feature Request to make it easier for others to spot in the issues? 😄

JasonTheAdams avatar Sep 13 '18 22:09 JasonTheAdams

To note - groupCells addresses this issue. If a single grouped slide contains all the cells, then both previous & next buttons will be disabled.

desandro avatar Jan 16 '22 03:01 desandro