React component for micro-interactions
npm install react-interactions --save
Be sure to include styles at some point, probably during your bootstrapping:
import 'react-interactions/dist/main.css';
Use Tap
component:
import React from 'react';
import Tap from 'react-interactions';
const MyButton = () => {
<button className="MyButton">
Click me
<Tap scale fade waves />
</button>
}
export default MyButton;
Be sure that the parent element has position: relative|absolute|fixed
- Drop dependencies
- Set scale level
- Set fade level
- Make production build
npm run build
- Change current version in
package.json
. - If you did some changes in styleguide styles, run
npm styleguide:build
- Run
npm publish
to publish the package to npm.