{"id":19310897,"url":"https://github.com/kartikeyvaish/react-native-like-button","last_synced_at":"2026-04-29T09:02:39.564Z","repository":{"id":57338071,"uuid":"431473436","full_name":"kartikeyvaish/react-native-like-button","owner":"kartikeyvaish","description":"Animated Like Button Component for React native apps","archived":false,"fork":false,"pushed_at":"2021-11-24T12:31:58.000Z","size":370,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-26T12:59:33.342Z","etag":null,"topics":["like","react-native"],"latest_commit_sha":null,"homepage":"https://github.com/kartikeyvaish/react-native-like-button","language":"Java","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/kartikeyvaish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-24T12:21:43.000Z","updated_at":"2025-01-07T12:27:58.000Z","dependencies_parsed_at":"2022-09-14T18:51:07.945Z","dependency_job_id":null,"html_url":"https://github.com/kartikeyvaish/react-native-like-button","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kartikeyvaish/react-native-like-button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartikeyvaish%2Freact-native-like-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartikeyvaish%2Freact-native-like-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartikeyvaish%2Freact-native-like-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartikeyvaish%2Freact-native-like-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kartikeyvaish","download_url":"https://codeload.github.com/kartikeyvaish/react-native-like-button/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartikeyvaish%2Freact-native-like-button/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261853338,"owners_count":23219845,"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","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":["like","react-native"],"created_at":"2024-11-10T00:26:51.315Z","updated_at":"2026-04-29T09:02:34.532Z","avatar_url":"https://github.com/kartikeyvaish.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Like Button\n\nProvides an animated like/unlike button for reusability.\n\n## Features\n\n- Animated Like Button\n- Fully customizable\n\n## ✨ Preview\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i.imgur.com/4FhxI6u.gif\" width=300 height=700 /\u003e\n\u003c/p\u003e\n\n## Installation\n\nJust run the below command in your project folder\n\nNote:- This runs only in React Native CLI project. For Expo projects, use [this](https://github.com/kartikeyvaish/expo-like-button) package.\n\nTo install,\n\n    npm install --save react-native-like-button\n\n## Usage\n\n### UnControlled Component\n\nBelow shown is the usage of the component as an uncontrolled component.\n\n```javascript\nimport LikeButton from 'react-native-like-button';\n\n...\n\n// basic Usage\n\u003cLikeButton /\u003e\n```\n\n### Controlled Component\n\nFor controlled component, you can use it as shown.\n\n```javascript\nimport LikeButton from \"react-native-like-button\";\n\nconst [Liked, SetLiked] = useState(true);\n\nconst onLikePress = async () =\u003e {\n  // Do something for Like operation\n  SetLiked(true);\n};\n\nconst onUnLikePress = async () =\u003e {\n  // Do something for Like operation\n  SetLiked(true);\n};\n\n// basic Usage\n\u003cLikeButton liked={Liked} onPress={Liked ? onUnLikePress : onLikePress} /\u003e;\n```\n\n## Parameters\n\n### Basic Parameters\n\n| Parameter | Default     | Description                                                                                         |\n| --------- | ----------- | --------------------------------------------------------------------------------------------------- |\n| liked     | `undefined` | Color of the timestamp which shows total time that has been elapsed since the video started playing |\n| onPress   | `undefined` | Color of the timestamp which shows total duration of the clip                                       |\n| iconSize  | `undefined` | Color of the timestamp which shows total duration of the clip                                       |\n\n### Liked Icon Component Props\n\n| Parameter            | Default           | Description                                                                        |\n| -------------------- | ----------------- | ---------------------------------------------------------------------------------- |\n| likedColor           | `red`             | Color of the liked icon                                                            |\n| likedIconName        | `\"heart-outline\"` | name of the icon when liked is true (Derived from `MaterialCommunityIcons` family) |\n| customLikedComponent | `null`            | custom component to show in place of liked icon                                    |\n\n### UnLiked Icon Component Props\n\n| Parameter              | Default   | Description                                                                         |\n| ---------------------- | --------- | ----------------------------------------------------------------------------------- |\n| unlikedColor           | `black`   | Color of the unliked icon                                                           |\n| unlikedIconName        | `\"heart\"` | name of the icon when liked is false (Derived from `MaterialCommunityIcons` family) |\n| customUnlikedComponent | `null`    | custom component to show in place of unliked icon                                   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartikeyvaish%2Freact-native-like-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkartikeyvaish%2Freact-native-like-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartikeyvaish%2Freact-native-like-button/lists"}