hooper icon indicating copy to clipboard operation
hooper copied to clipboard

Center elements when itemsToShow is more than 1

Open saerose opened this issue 6 years ago • 6 comments

Is there a way to do this other than centering the flex on the hooper track? Center mode isn't an option either (it does not work ok). If I have, for example, three elements they align to the left and I want them on the center.

saerose avatar Oct 16 '19 08:10 saerose

@saerose could you do this w/ the breakpoints object under hooperSettings?

   breakpoints: {
          769: {
            itemsToShow: 4,
          },
          1200: {
            itemsToShow: 3,
          }
    }

Just a thought as I was browsing this repo

rylanb avatar Feb 16 '20 23:02 rylanb

Thanks for answering but we decided to use another slider seeing that no one cares about this one. ☹️

saerose avatar Feb 17 '20 07:02 saerose

Yeah ... left it as much for anyone coming after you. :)

rylanb avatar Feb 17 '20 14:02 rylanb

Yeah ... left it as much for anyone coming after you. :)

image

I don't know why but in mobile device => itemsToShow = 2 it's not working! I use the current version(^0.3.4), hope you can help me resolve that! @rylanb

harrytran998 avatar Mar 16 '20 14:03 harrytran998

@harrytran998 I'm not sure I can but do you have itemsToShow: set to the default #? That should work for mobile

so it might look like:

itemsToShow: 2,
breakpoints: { <your code from screenshot >}

try that ?

rylanb avatar Mar 16 '20 17:03 rylanb

@harrytran998 I'm not sure I can but do you have itemsToShow: set to the default #? That should work for mobile

so it might look like:

itemsToShow: 2,
breakpoints: { <your code from screenshot >}

try that ?

Oh, thank you, bro! It's worked!

harrytran998 avatar Mar 17 '20 01:03 harrytran998