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

Show different UI when item is active #895

Open
acopetkovic opened this issue Nov 24, 2021 · 1 comment
Open

Show different UI when item is active #895

acopetkovic opened this issue Nov 24, 2021 · 1 comment

Comments

@acopetkovic
Copy link

Is it possible to show the buttons only on active item and the items that are not active don't have any buttons?
carousel

@Navipro70
Copy link

Navipro70 commented Dec 2, 2021

@acopetkovic
Just use onSnapToItem prop to get active index, and compare if card is active (index === activeIndex) - show buttons, if is not active - hide.

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