Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-animated-heart

ShaunLWM507MIT0.0.8TypeScript support: included

Simple Twitter-like animated heart

twitter-heart, twitter-animated-heart, like button, heart button, heart, exploding button

readme

react-animated-heart

"Monthly Download" "Latest Release" MIT license

A simple Twitter-like animated button. desperately needed it for one of my projects.

script preview

Installation

npm install react-animated-heart

yarn add react-animated-heart

Usage

import React, { useState } from "react";
import Heart from "react-animated-heart";

export default function App() {
  const [isClick, setClick] = useState(false);
  return (
    <div className="App">
      <Heart isClick={isClick} onClick={() => setClick(!isClick)} />
    </div>
  );
}

License

MIT