Skip to content

About

React Hook to detect option that reduce browser animation and motion for A11Y

Topics

Resources

Code of conduct

Stars

7 stars

Watchers

1 watching

Forks

Repository files navigation

Welcome to use-reduced-motion πŸ‘‹

Version Documentation Maintenance License: MIT Twitter: Slashgear_

React hook to detect user reduced motion feature

Install

npm install use-reduced-motion
yarn add use-reduced-motion

Usage

Use directly in your component. Pass the boolean value to your JS animated component to stop it.

import React from "react";
import { useReducedMotion } from "use-reduced-motion";
import { AnimatedDiv } from "../somewhere";

export const MyExampleComponent = () => {
  const stopMotion = useReducedMotion();
  return <AnimatedDiv pause={stopMotion} />;
};

Author

πŸ‘€ Antoine CARON antoine395.caron@gmail.com

Show your support

Give a ⭐️ if this project helped you!

πŸ“ License

Copyright Β© 2020 Antoine CARON antoine395.caron@gmail.com.
This project is MIT licensed.


This README was generated with ❀️ by readme-md-generator

About

React Hook to detect option that reduce browser animation and motion for A11Y

Topics

Resources

Code of conduct

Stars

7 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages