We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be great if the carousel would stop autoplay when user’s reduce motion is true (prefers-reduced-motion: reduce) in OS?
I can get this to work but it removes the previous/next buttons so we’re left with the first slide visible and navigable.
`// Check if the user prefers reduced motion const prefersReducedMotion = window.matchMedia(‘(prefers-reduced-motion: reduce)’).matches;
// Set autoplay based on the user’s preference const autoplayEnabled = !prefersReducedMotion;
const slider = new A11YSlider(document.querySelector(‘.slider’), { adaptiveHeight: true, dots: true, arrows: true, autoplay: autoplayEnabled, autoplaySpeed: 5000 });`
Any ideas on how we get this to work?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It would be great if the carousel would stop autoplay when user’s reduce motion is true (prefers-reduced-motion: reduce) in OS?
I can get this to work but it removes the previous/next buttons so we’re left with the first slide visible and navigable.
`// Check if the user prefers reduced motion
const prefersReducedMotion = window.matchMedia(‘(prefers-reduced-motion: reduce)’).matches;
// Set autoplay based on the user’s preference
const autoplayEnabled = !prefersReducedMotion;
const slider = new A11YSlider(document.querySelector(‘.slider’), {
adaptiveHeight: true,
dots: true,
arrows: true,
autoplay: autoplayEnabled,
autoplaySpeed: 5000
});`
Any ideas on how we get this to work?
The text was updated successfully, but these errors were encountered: