{"id":24317921,"url":"https://github.com/abdheshnayak/react-pulsable","last_synced_at":"2026-03-12T15:04:03.720Z","repository":{"id":198784595,"uuid":"701542735","full_name":"abdheshnayak/react-pulsable","owner":"abdheshnayak","description":"This is a simple and customizable react component library to add the pulsing/skeleton loading effect to your existing component.","archived":false,"fork":false,"pushed_at":"2024-12-13T06:00:00.000Z","size":3022,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T14:56:21.470Z","etag":null,"topics":["component","pulse-effects","react","skeleton"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-pulsable","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/abdheshnayak.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-06T21:48:21.000Z","updated_at":"2024-12-13T06:00:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"410852d6-5f56-455c-8097-42ad6c66025d","html_url":"https://github.com/abdheshnayak/react-pulsable","commit_stats":null,"previous_names":["abdheshnayak/react-pulsable","opensource-hq/react-pulsable","alphadevhq/react-pulsable"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdheshnayak%2Freact-pulsable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdheshnayak%2Freact-pulsable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdheshnayak%2Freact-pulsable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdheshnayak%2Freact-pulsable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdheshnayak","download_url":"https://codeload.github.com/abdheshnayak/react-pulsable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234376927,"owners_count":18822417,"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":["component","pulse-effects","react","skeleton"],"created_at":"2025-01-17T14:35:40.254Z","updated_at":"2025-09-27T03:31:03.030Z","avatar_url":"https://github.com/abdheshnayak.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Pulsable\n\nThis is a simple react component that can be used to wrap other components and add a pulsing/skeleton effect to them.\n\n**[Code Sandbox Link](https://codesandbox.io/s/k7fdzw?file=/src/App.js)**\n\n![Demo Image](./screenshot.png)\n\n### Importing\n```jsx\nimport Pulsable from 'react-pulsable';\nimport 'react-pulsable/index.css';\n```\n\n\n\n### how to use it?\n\n```jsx\nconst App = ({ isLoading }: { isLoading: boolean }) =\u003e {\n  return (\n    \u003c\u003e\n      {/* default background */}\n      \u003cPulsable isLoading={isLoading}\u003e\n        \u003cYourComponent2 /\u003e\n      \u003c/Pulsable\u003e\n\n      {/* custom background */}\n      \u003cPulsable\n        isLoading={isLoading}\n        config={{\n          bgColors: {\n            light: 'rgba(0, 128, 0, 0.2)',\n            medium: 'rgba(0, 128, 0, 0.3)',\n          },\n        }}\n      \u003e\n        \u003cYourComponent /\u003e\n      \u003c/Pulsable\u003e\n\n      {/* custom background with no rounded corners */}\n      \u003cPulsable\n        isLoading={isLoading}\n        config={{\n          noRadius: true,\n          bgColors: {\n            light: 'rgba(0, 0, 255, 0.2)',\n            medium: 'rgba(0, 0, 255, 0.3)',\n          },\n        }}\n      \u003e\n        \u003cYourComponent /\u003e\n      \u003c/Pulsable\u003e\n\n      {/* custom background with no padding in each skeleton items */}\n      \u003cPulsable\n        isLoading={isLoading}\n        config={{\n          noPadding: true,\n          bgColors: {\n            light: 'tomato',\n            medium: 'orange',\n          },\n        }}\n      \u003e\n        \u003cYourComponent /\u003e\n      \u003c/Pulsable\u003e\n    \u003c/\u003e\n  );\n};\n```\n\n### what you have to do in your component?\n\n```jsx\nconst YourComponent = () =\u003e {\n  return (\n    \u003cform\u003e\n      \u003clabel htmlFor=\"name\" className=\"pulsable\"\u003e\n        Name:\n      \u003c/label\u003e\n      \u003cdiv className=\"pulsable\"\u003e\n        \u003cinput type=\"text\" id=\"name\" /\u003e\n      \u003c/div\u003e\n\n      \u003clabel htmlFor=\"email\" className=\"pulsable\"\u003e\n        Email:\n      \u003c/label\u003e\n      \u003cdiv className=\"pulsable\"\u003e\n        \u003cinput type=\"email\" id=\"email\" /\u003e\n      \u003c/div\u003e\n\n      \u003cbutton className=\"pulsable\" type=\"submit\"\u003e\n        Submit\n      \u003c/button\u003e\n    \u003c/form\u003e\n  );\n};\n```\n\n## Usage Guide\n\nThe component takes following props:\n- `isLoading`: a boolean that indicates whether the component should be pulsing or not.\n- `config`: an object that contains the configuration for the pulsing effect. It has following properties:\n  - `bgColors`: an object that contains the background colors for the pulsing effect. It has two properties:\n    - `light`: the light color of the background.\n    - `medium`: the medium color of the background.\n  - `noRadius`: a boolean that indicates whether the pulsing effect should have rounded corners or not. By default it has rounded corners.\n  - `noPadding`: a boolean that indicates whether the pulsing effect should have padding in each skeleton items or not. By default it has padding.\n  - `animation`: you can pass animation type as a string. default is `wave` and other options are `wave-reverse`, `pulse`, `none\n\n- `className`: as Pulsable component is a wrapper component, you can pass className or alomost all attributes of div element.[means you can treat it as a div, and use accordingly]\n\n\u003e check [example](https://codesandbox.io/s/k7fdzw?file=/src/App.js) for more.\n\n### Conditions:\n\n- You must wrap the component you want to add the pulsing effect to with the `Pulsable` component.\n- You must provide isLoading state to the `Pulsable` component.\n- You can use the `className=\"pulsable\"` to add the pulsing effect to any element.\n- if your component is a self closing tag like `\u003cimg /\u003e` you should have to wrap it with div and add `pulsable` class to that. \n- if you want to hide some components while loading add class name `pulsable-hidden`\n- if you want to add image icon in skeleton add class name `pulsable-img`\n- for the paragraph use classname `pulsable-para`\n- while applying base config to all elements, you may need some exceptions. for that you can use `pulsable-no-radius`, `pulsable-no-padding`, `pulsable-radius` and `pulsable-padding`. by using these classes you can override some specific elements.\n\n- As Shown in example, for better performance you can use `flex` and  `align-items: flex-start` in parentNode to avoid the pulsing effect from stretching the component. you can also add these styles conditionally wihile loading, if it's affecting your design.\n\n\n\n\n### Using CDN\nfor cdn you can use another package [pulsable](https://www.npmjs.com/package/pulsable)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdheshnayak%2Freact-pulsable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdheshnayak%2Freact-pulsable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdheshnayak%2Freact-pulsable/lists"}