use-boop
v1.1.1
Published
Extended react hook for Josh Comeau's boop effect
Downloads
8,349
Maintainers
Readme
use-boop
Extended react hook for Josh Comeau's boop effect
Install
npm install --save react-spring use-boop
Usage
import useBoop from 'use-boop';
import { animated } from 'react-spring';
const SomeComponent = () => {
const [style, trigger] = useBoop({ rotation: 45 });
return (
<animated.div style={style} onMouseEnter={trigger}>
{/* Child can be anything */}
<AiOutlineQuestionCircle size={80} />
</animated.div>
);
};