Skip to content
Discussion options

You must be logged in to vote

Edit:
Meanwhile they updated the package, so see new answer in the comment below. 👍

@ronaldaug I've found a solution. For this to work you need to know/calculate the total number of items you have at runtime. I'm guessing since you get your data from an API, you can work with something like items.length . I did this with react-splide but will try to tell the concept with the regular HTML.

HTML:

<div class="wrapper"> <section class="splide"> <div class="splide__track"> <ul class="splide__list"> <li class="splide__slide"> -- Some loop renders multiple slides here. -- </li> </ul> </div> </section> </div>

CSS:

.wrapper { display: flex; justify-content: cent…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ronaldaug
Comment options

You must be logged in to vote
1 reply
@lindsayweb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants