{"id":24073018,"url":"https://github.com/react-sandbox/heart","last_synced_at":"2026-03-01T14:31:22.599Z","repository":{"id":191411938,"uuid":"680064327","full_name":"react-sandbox/heart","owner":"react-sandbox","description":"❤️ \"Like\" button","archived":false,"fork":false,"pushed_at":"2024-03-14T01:27:45.000Z","size":298,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-07T07:05:13.690Z","etag":null,"topics":["button","component","heart","react","react-heart","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-sandbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-18T08:57:36.000Z","updated_at":"2025-03-13T17:32:37.000Z","dependencies_parsed_at":"2023-08-29T20:30:55.000Z","dependency_job_id":"aa8a8643-7c2b-4de4-828b-f06ef8c767e3","html_url":"https://github.com/react-sandbox/heart","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.08695652173913049,"last_synced_commit":"b08fcc74e4093051294e167109a850531e093364"},"previous_names":["react-sandbox/heart"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/react-sandbox/heart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-sandbox%2Fheart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-sandbox%2Fheart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-sandbox%2Fheart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-sandbox%2Fheart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-sandbox","download_url":"https://codeload.github.com/react-sandbox/heart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-sandbox%2Fheart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267626986,"owners_count":24117709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["button","component","heart","react","react-heart","typescript"],"created_at":"2025-01-09T17:25:37.158Z","updated_at":"2026-03-01T14:31:22.540Z","avatar_url":"https://github.com/react-sandbox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@react-sandbox/heart\"\u003e@react-sandbox/heart\u003c/a\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/react-sandbox/heart/playwright.yml\" alt=\"Build status\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/dependencies-0-brightgreen\" alt=\"Dependencies\" /\u003e\n  \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/@react-sandbox/heart?color=%234ba0f6\" alt=\"Build size\" /\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dt/@react-sandbox/heart?color=%234ba0f6\" alt=\"Package downloads\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"example.gif\" alt=\"Example\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e❤️ Animated heart button.\u003c/p\u003e\n\n## Usage\n\n### Install\n\nInstall the `@react-sandbox/heart` package:\n\n```\nnpm install @react-sandbox/heart\n```\n\n### Import\n\nImport the `Heart` component:\n\n```tsx\nimport React, { useState } from 'react'\nimport Heart from '@react-sandbox/heart'\n\nfunction App() {\n  const [active, setActive] = useState(false)\n\n  return (\n    \u003cdiv\u003e\n      \u003cHeart\n        width={24}\n        height={24}\n        active={active}\n        onClick={() =\u003e setActive(!active)}\n      /\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n### Props\n\n| Prop            | Type                  | Default      | Description             |\n| --------------- | --------------------- | ------------ | ----------------------- |\n| `width`         | `number`              | **required** | Heart width             |\n| `height`        | `number`              | **required** | Heart height            |\n| `active`        | `boolean`             | **required** | Heart fill \u0026 animation  |\n| `onClick`       | `function`            | **required** | Click callback function |\n| `activeColor`   | `string`              | `'#ff0000'`  | Active color            |\n| `inactiveColor` | `string`              | `'#121212'`  | Inactive color          |\n| `strokeWidth`   | `number`              | `30`         | Outline stroke width    |\n| `disabled`      | `boolean`             | `false`      | Disable usage           |\n| `ariaLabel`     | `string`              | `'Like'`     | Accessibility label     |\n| `className`     | `string`              | `-`          | CSS classes             |\n| `style`         | `React.CSSProperties` | `-`          | CSS styles              |\n\n## Development\n\n### Local\n\n```\npnpm install\npnpm dev\n```\n\n### Tests\n\n```\npnpm test\n```\n\n### Example\n\nInside `test/`:\n\n```\npnpm install\npnpm dev\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-sandbox%2Fheart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-sandbox%2Fheart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-sandbox%2Fheart/lists"}