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

STYLE: reduced slider indicators and added a hook for reduced motion preference #28

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

barbaraperic
Copy link
Contributor

Changes

This PR includes the following styling changes to the Slider component:

  • reduced motion speed
  • reduced number of slider indicators (desktop and tablet 3 indicators, mobile 4 indicators)

I also included a usePrefersReducedMotion hook which will disable the animation for the users who have system preferences set to Reduce Motion (users who opt out of animation). See here for the article.

How to test Reduce Motion?

Enable Reduce Motion settings, and check if the animation is disabled. Otherwise the animation should be enabled. Instruction where to find Reduce Motion settings.

Visuals

Before implementation

Screenshot 2024-04-09 at 15 18 51

Screenshot 2024-04-09 at 15 20 15

After implementation

Screenshot 2024-04-09 at 15 19 41

Screenshot 2024-04-09 at 15 20 35

Reduced motion implementation

CleanShot.2024-04-09.at.15.21.37.mp4

@willscott willscott merged commit 2d2e048 into ipni:main Apr 9, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants