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

Is it possible to give arbitrary classes/styles to the active panel? #853

Open
stefanobartoletti opened this issue Mar 4, 2024 · 2 comments
Assignees
Labels
🔖4.x v4.x~ related issue ❓Question Asking question about @egjs/Flicking

Comments

@stefanobartoletti
Copy link

Just like the title says, it is possible to give a particular class or styles to the active panel?

I haven't found anything in the docs that can help me.

Something similar is already present on the Pagination plugin, where the "current" dot has the special class flicking-pagination-bullet-active.

Is it possible to enable something similar also for the currently active panel?

@malangfox malangfox self-assigned this Mar 6, 2024
@malangfox malangfox added ❓Question Asking question about @egjs/Flicking 🔖4.x v4.x~ related issue labels Mar 6, 2024
@malangfox
Copy link
Contributor

Hello @stefanobartoletti.

We do not have an option for adding a class to the active panel, but you can implement this using the willChange and willRestore events.
You can check this demo of this implementation.

Our team will discuss adding this as an option in the future, but until then, you can use the above implementation.

@stefanobartoletti
Copy link
Author

stefanobartoletti commented Mar 7, 2024

Thanks for your reply, this is really handy. I will check all the API options too.

If you consider this for a future release, you may also consider some special prev and next classes to give to the immediate previous and next panels.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖4.x v4.x~ related issue ❓Question Asking question about @egjs/Flicking
Projects
None yet
Development

No branches or pull requests

2 participants