{"id":13571519,"url":"https://github.com/gokcan/react-shimmer","last_synced_at":"2025-05-15T05:08:20.126Z","repository":{"id":42629869,"uuid":"138738190","full_name":"gokcan/react-shimmer","owner":"gokcan","description":"🌠 Async loading, performant Image component for React.js","archived":false,"fork":false,"pushed_at":"2023-03-06T06:53:17.000Z","size":5233,"stargazers_count":1156,"open_issues_count":16,"forks_count":36,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-14T08:14:55.795Z","etag":null,"topics":["async","loader","placeholder","react","react-image","react-suspense","shimmer"],"latest_commit_sha":null,"homepage":"https://nh9x1.csb.app","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/gokcan.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}},"created_at":"2018-06-26T12:56:11.000Z","updated_at":"2025-03-26T00:30:50.000Z","dependencies_parsed_at":"2024-01-10T21:05:19.457Z","dependency_job_id":null,"html_url":"https://github.com/gokcan/react-shimmer","commit_stats":{"total_commits":111,"total_committers":7,"mean_commits":"15.857142857142858","dds":0.7117117117117118,"last_synced_commit":"e1d42c429e5ba5f5d5990e5a631546d59480f2d6"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokcan%2Freact-shimmer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokcan%2Freact-shimmer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokcan%2Freact-shimmer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokcan%2Freact-shimmer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gokcan","download_url":"https://codeload.github.com/gokcan/react-shimmer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"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":["async","loader","placeholder","react","react-image","react-suspense","shimmer"],"created_at":"2024-08-01T14:01:02.741Z","updated_at":"2025-05-15T05:08:15.118Z","avatar_url":"https://github.com/gokcan.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align='center'\u003e\n  \u003cimg alt='Logo' src='https://cdn.rawgit.com/gokcan/react-shimmer/master/media/logo.png' width=40%\u003e\n\u003c/p\u003e\n\n\u003e A powerful, customisable, Suspense-like `\u003cimg\u003e` component that (optionally) simulates a [**shimmer**](https://github.com/facebook/Shimmer) effect while __loading__. (with zero dependencies!).\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-shimmer\"\u003e\n    \u003cimg alt= \"NPM\" src=\"https://img.shields.io/npm/v/react-shimmer.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://standardjs.com\"\u003e\n    \u003cimg alt=\"JavaScript Style Guide\" src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/gokcan/react-shimmer/actions?query=workflow%3A%22Node.js+CI%22\"\u003e\n    \u003cimg alt=\"Github Actions CI Status\" src=\"https://github.com/gokcan/react-shimmer/workflows/Node.js%20CI/badge.svg?branch=master\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/gokcan/react-shimmer/maintainability\"\u003e\n    \u003cimg alt= \"Maintainability\" src=\"https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Header\" src=\"https://cdn.rawgit.com/gokcan/react-shimmer/master/media/header.png\" width=60%\u003e\n\u003c/p\u003e\n\n### [__Live Demo__](https://codesandbox.io/s/nh9x1)\n\n![](https://cdn.rawgit.com/gokcan/react-shimmer/master/media/demo.gif)\n\n## Install\n\n```bash\nnpm i react-shimmer\n```\n\nor\n\n```bash\nyarn add react-shimmer\n```\n\n## Usage\n\n```jsx\nimport React from 'react'\nimport { Image, Shimmer } from 'react-shimmer'\n\nfunction App() {\n  return (\n    \u003cdiv\u003e\n      \u003cImage\n        src='https://source.unsplash.com/random/800x600'\n        fallback={\u003cShimmer width={800} height={600} /\u003e}\n      /\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n```jsx\nimport React from 'react'\nimport { Image, Breathing } from 'react-shimmer'\n\nfunction App() {\n  return (\n    \u003cdiv\u003e\n      \u003cImage\n        src='https://source.unsplash.com/random/800x600'\n        fallback={\u003cBreathing width={800} height={600} /\u003e}\n      /\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\nor you can use your custom React component as a fallback:\n\n```jsx\nimport React from 'react'\nimport { Image } from 'react-shimmer'\n\nimport Spinner from './Spinner'\n\nfunction App(props) {\n  return (\n    \u003cdiv\u003e\n      \u003cImage\n        src=\"https://example.com/test.jpg\"\n        fallback={\u003cSpinner /\u003e}\n      /\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n### Properties\n\nProperty | Type | Required | Default value | Description\n:--- | :--- | :--- | :--- | :---\n`src`|string|yes||\n`fallback`|ReactNode|yes||\n`errorFallback`|func|no||\n`onLoad`|func|no||\n`delay`|number|no|| Delay in milliseconds before showing the `fallback`\n`fadeIn`|bool|no|false|Use built-in fade animation on img\n`NativeImgProps`|React.ImgHTMLAttributes\u003cHTMLImageElement\u003e|no||\n-----\n\n## Contributing\n---\n\nFeel free to send PRs.\n\n## License\n\nMIT © [gokcan](https://github.com/gokcan)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokcan%2Freact-shimmer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgokcan%2Freact-shimmer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokcan%2Freact-shimmer/lists"}