Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set initital slide index #215

Open
multipliedtwice opened this issue Dec 23, 2021 · 1 comment
Open

Set initital slide index #215

multipliedtwice opened this issue Dec 23, 2021 · 1 comment

Comments

@multipliedtwice
Copy link

multipliedtwice commented Dec 23, 2021

hello, thank you for the great library. Is there any way to set the initial slide by index without using the method scrollItem and watching animation?

Also is there any way to enable drag snap?

@NickPiscitelli
Copy link
Owner

You can use scrollTo and pass 0 for the second argument. You will need to pass the offset directly though which you can get by item width times the index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants