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

I have a row of images. I have to use this carousel only when device width is small. How to achieve this? Is there any parameter to enable or disable this plugin based on screen width? #597

Open
Jayachandran-J-98 opened this issue Jun 13, 2022 · 1 comment

Comments

@Jayachandran-J-98
Copy link

Is your feature request related to a problem?
Please describe. A clear and concise description of what the problem is. Ex. I have an issue when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen. Add any considered drawbacks.

If any, describe the alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Teachability, Documentation, Adoption, Migration Strategy
If you can, explain how users will be able to use this and possibly write out a version the docs. Maybe a screenshot or design?

@carmmac
Copy link

carmmac commented Jul 18, 2022

you can make a computed property like this:
isMobileView() { return document.documentElement.clientWidth <= MOBILE_VIEW_MAX_WIDTH; },

then make two blocks in template section - one if isMobile === true (and render carousel), another if not (and render something else).

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