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

Variable width of single slides #221

Open
dgsiegel opened this issue Feb 3, 2022 · 2 comments
Open

Variable width of single slides #221

dgsiegel opened this issue Feb 3, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@dgsiegel
Copy link

dgsiegel commented Feb 3, 2022

Is it somehow possible to have a slider consisting of items with different widths? For example several images in portrait, landscape and square format?

Looking at the code it seems that all items get assigned the same width: https://github.com/NickPiscitelli/Glider.js/blob/master/glider.js#L134

But it might be easy enough to change _.itemWidth to a variable width at https://github.com/NickPiscitelli/Glider.js/blob/master/glider.js#L127

I've tried to look for events I could hook on to change this, but wasn't able to find a matching one.

@FynnZW
Copy link

FynnZW commented Jan 19, 2023

That would be great. I wanted to use this as a way to add scrolling arrows to a simple horizontal scrolling container with elements of various widths. But I couldn't because itemWidth has to be a fixed value.
Something like itemWidth: 'auto' would make this library much more versatile.

@Superhands89
Copy link

Superhands89 commented Jan 11, 2024

+1

@NickPiscitelli NickPiscitelli added the enhancement New feature or request label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants