3.0.0 ā€¢ Published 3 years ago

use-reduced-motion v3.0.0

Weekly downloads
17
License
MIT
Repository
github
Last release
3 years ago

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

3.0.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.10

3 years ago

1.1.6-2

3 years ago

1.1.6-1

3 years ago

1.1.6-0

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.0.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago