[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10106":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},10106,"react-content-loader","danilowoz\u002Freact-content-loader","danilowoz","⚪ SVG-Powered component to easily create skeleton loadings.","https:\u002F\u002Fskeletonreact.com",null,"TypeScript",13999,425,82,18,0,1,9,42.89,"MIT License",false,"master",true,[25,26,27,28,29,30,31,32,33,34,35],"facebook-cards-loaders","hacktoberfest","loader","loading","placeholder","react","react-native","react-native-components","skeleton","skeleton-screen","svg","2026-06-12 02:02:17","\u003Cp align=\"center\">\n  \u003Cimg width=\"350\" alt=\"react-content-loader\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F4838076\u002F34419335-5669c3f8-ebea-11e7-9668-c47b7846970b.png\"\u002F>\n\u003C\u002Fp>\n\u003Cp align=\"center\">\n  \u003Cimg width=\"400\" alt=\"Example's react-content-loader\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F4838076\u002F34308760-ec55df82-e735-11e7-843b-2e311fa7b7d0.gif\" \u002F>\n\u003C\u002Fp>\n\nSVG-Powered component to easily create placeholder loadings (like Facebook's cards loading).\n\n## Features\n\n- :gear: **Customizable:** Feel free to change the colors, speed, sizes, and even **RTL**;\n- :ok_hand: **Plug and play:** with many presets to use, see the [examples](http:\u002F\u002Fdanilowoz.com\u002Fcreate-content-loader\u002F#gallery);\n- :pencil2: **DIY:** use the [create-content-loader](https:\u002F\u002Fdanilowoz.com\u002Fcreate-content-loader) to create your own custom loaders easily;\n- 📱 **React Native support**: same API, as same powerful features;\n- ⚛️ **Really lightweight:** less than **2kB** and **0 dependencies** for web version;\n\n## Index\n\n- [Getting Started](#gettingstarted)\n- [Usage](#usage)\n  - [Native](#native)\n- [Options](#options)\n- [Examples](#examples)\n- [Troubleshooting](#troubleshooting)\n- [Similar packages](#similarpackages)\n- [Development](#development)\n\n## Getting Started\n\n```sh\nnpm i react-content-loader --save\n```\n\n```sh\nyarn add react-content-loader\n```\n\n### For React Native\n\n```sh\nnpm i react-content-loader react-native-svg --save\n```\n\n```sh\nyarn add react-content-loader react-native-svg\n```\n\nCDN from [JSDELIVR](https:\u002F\u002Fwww.jsdelivr.com\u002Fpackage\u002Fnpm\u002Freact-content-loader)\n\n## Usage\n\nThere are two ways to use it:\n\n**1. Presets, see the [examples](https:\u002F\u002Fdanilowoz.com\u002Freact-content-loader\u002F):**\n\n```jsx\nimport ContentLoader, { Facebook } from 'react-content-loader'\n\nconst MyLoader = () => \u003CContentLoader \u002F>\nconst MyFacebookLoader = () => \u003CFacebook \u002F>\n```\n\n**2. Custom mode, see the [online tool](https:\u002F\u002Fdanilowoz.com\u002Fcreate-content-loader)**\n\n```jsx\nconst MyLoader = () => (\n  \u003CContentLoader viewBox=\"0 0 380 70\">\n    {\u002F* Only SVG shapes *\u002F}    \n    \u003Crect x=\"0\" y=\"0\" rx=\"5\" ry=\"5\" width=\"70\" height=\"70\" \u002F>\n    \u003Crect x=\"80\" y=\"17\" rx=\"4\" ry=\"4\" width=\"300\" height=\"13\" \u002F>\n    \u003Crect x=\"80\" y=\"40\" rx=\"3\" ry=\"3\" width=\"250\" height=\"10\" \u002F>\n  \u003C\u002FContentLoader>\n)\n```\n\n**Still not clear?** Take a look at this working example at [codesandbox.io](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fmoojk887z9)\nOr try the components editable demo hands-on and install it from [bit.dev](https:\u002F\u002Fbit.dev\u002Fdanilowoz\u002Freact-content-loader)\n\n## Native\n\n`react-content-loader` can be used with React Native in the same way as web version with the same import:\n\n**1. Presets, see the [examples](#examples):**\n\n```jsx\nimport ContentLoader, { Facebook } from 'react-content-loader\u002Fnative'\n\nconst MyLoader = () => \u003CContentLoader \u002F>\nconst MyFacebookLoader = () => \u003CFacebook \u002F>\n```\n\n**2. Custom mode**\n\n**To create custom loaders there is an important difference:** as React Native doesn't have any native module for SVG components, it's necessary to import the shapes from [react-native-svg](https:\u002F\u002Fgithub.com\u002Freact-native-community\u002Freact-native-svg) or use the named export Rect and Circle from `react-content-loader` import:\n\n```jsx\nimport ContentLoader, { Rect, Circle } from 'react-content-loader\u002Fnative'\n\nconst MyLoader = () => (\n  \u003CContentLoader viewBox=\"0 0 380 70\">\n    \u003CCircle cx=\"30\" cy=\"30\" r=\"30\" \u002F>\n    \u003CRect x=\"80\" y=\"17\" rx=\"4\" ry=\"4\" width=\"300\" height=\"13\" \u002F>\n    \u003CRect x=\"80\" y=\"40\" rx=\"3\" ry=\"3\" width=\"250\" height=\"10\" \u002F>\n  \u003C\u002FContentLoader>\n)\n```\n\n## Options\n\n| \u003Cdiv style=\"width:250px\">Prop name and type\u003C\u002Fdiv>                | Environment                | Description                                                                                                                                                                                                                                                                                         |\n| ---------------------------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`animate?: boolean`** \u003Cbr\u002F> Defaults to `true`                 | React DOM\u003Cbr\u002F>React Native | Opt-out of animations with `false`                                                                                                                                                                                                                                                                  |\n| **`title?: string`** \u003Cbr\u002F> Defaults to `Loading...`              | React DOM only             | It's used to describe what element it is. \u003Cbr \u002F>Use `''` (empty string) to remove.                                                                                                                                                                                                                  |\n| **`baseUrl?: string`**\u003Cbr \u002F> Defaults to an empty string         | React DOM only             | Required if you're using `\u003Cbase url=\"\u002F\" \u002F>` document `\u003Chead\u002F>`. \u003Cbr\u002F>This prop is common used as: \u003Cbr\u002F>`\u003CContentLoader baseUrl={window.location.pathname} \u002F>` which will fill the SVG attribute with the relative path. Related [#93](https:\u002F\u002Fgithub.com\u002Fdanilowoz\u002Freact-content-loader\u002Fissues\u002F93). |\n| **`speed?: number`** \u003Cbr \u002F> Defaults to `1.2`                    | React DOM\u003Cbr\u002F>React Native | Animation speed in seconds.                                                                                                                                                                                                                                                                         |\n| **`viewBox?: string`** \u003Cbr \u002F> Defaults to `undefined`            | React DOM\u003Cbr\u002F>React Native | Use viewBox props to set a custom viewBox value, \u003Cbr\u002F>for more information about how to use it, \u003Cbr\u002F>read the article [How to Scale SVG](https:\u002F\u002Fcss-tricks.com\u002Fscale-svg\u002F).                                                                                                                        |\n| **`gradientRatio?: number`** \u003Cbr \u002F> Defaults to `1.2`            | React DOM only             | Width of the animated gradient as a fraction of the view box width.                                                                                                                                                                                                                                 |\n| **`rtl?: boolean`** \u003Cbr \u002F> Defaults to `false`                   | React DOM\u003Cbr\u002F>React Native | Content right-to-left.                                                                                                                                                                                                                                                                              |\n| **`backgroundColor?: string`** \u003Cbr \u002F> Defaults to `#f5f6f7`      | React DOM\u003Cbr\u002F>React Native | Used as background of animation.                                                                                                                                                                                                                                                                    |\n| **`foregroundColor?: string`** \u003Cbr \u002F> Defaults to `#eee`         | React DOM\u003Cbr\u002F>React Native | Used as the foreground of animation.                                                                                                                                                                                                                                                                |\n| **`backgroundOpacity?: number`** \u003Cbr \u002F> Defaults to `1`          | React DOM\u003Cbr\u002F>React Native | Background opacity (0 = transparent, 1 = opaque)\u003Cbr\u002F>used to solve an issue in [Safari](#safari--ios)                                                                                                                                                                                               |\n| **`foregroundOpacity?: number`** \u003Cbr \u002F> Defaults to `1`          | React DOM\u003Cbr\u002F>React Native | Animation opacity (0 = transparent, 1 = opaque)\u003Cbr\u002F>used to solve an issue in [Safari](#safari--ios)                                                                                                                                                                                                |\n| **`style?: React.CSSProperties`** \u003Cbr \u002F> Defaults to `{}`        | React DOM only             |                                                                                                                                                                                                                                                                                                     |\n| **`uniqueKey?: string`** \u003Cbr \u002F> Defaults to random unique id     | React DOM only             | Use the same value of prop key, \u003Cbr\u002F>that will solve inconsistency on the SSR, see more [here](https:\u002F\u002Fgithub.com\u002Fdanilowoz\u002Freact-content-loader\u002Fissues\u002F78).                                                                                                                                        |\n| **`beforeMask?: JSX.Element`** \u003Cbr \u002F> Defaults to null           | React DOM\u003Cbr\u002F>React Native | Define custom shapes before content, \u003Cbr\u002F>see more [here](https:\u002F\u002Fgithub.com\u002Fdanilowoz\u002Freact-content-loader\u002Fissues\u002F266).                                                                                                                                                                            |\n\nSee all options [live](https:\u002F\u002Fdanilowoz.com\u002Freact-content-loader\u002F)\n\n## Examples\n\n##### Facebook Style\n\n```jsx\nimport { Facebook } from 'react-content-loader'\n\nconst MyFacebookLoader = () => \u003CFacebook \u002F>\n```\n\n\u003Cimg alt=\"Facebook Style\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F4838076\u002F73212460-328f7500-4146-11ea-99e7-e19cd4e07a51.png\" width=\"500px\" \u002F>\n\n##### Instagram Style\n\n```jsx\nimport { Instagram } from 'react-content-loader'\n\nconst MyInstagramLoader = () => \u003CInstagram \u002F>\n```\n\n\u003Cimg alt=\"Instagram Style\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F4838076\u002F73212462-328f7500-4146-11ea-98dc-3a6aeafd4a26.png\" width=\"500px\" \u002F>\n\n##### Code Style\n\n```jsx\nimport { Code } from 'react-content-loader'\n\nconst MyCodeLoader = () => \u003CCode \u002F>\n```\n\n\u003Cimg alt=\"Code Style\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F4838076\u002F73212459-328f7500-4146-11ea-89b0-1b7bbae8047b.png\" width=\"500px\" \u002F>\n\n##### List Style\n\n```jsx\nimport { List } from 'react-content-loader'\n\nconst MyListLoader = () => \u003CList \u002F>\n```\n\n\u003Cimg alt=\"List Style\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F4838076\u002F73212463-33280b80-4146-11ea-9f93-95c2cbdef17b.png\" width=\"500px\" \u002F>\n\n##### Bullet list Style\n\n```jsx\nimport { BulletList } from 'react-content-loader'\n\nconst MyBulletListLoader = () => \u003CBulletList \u002F>\n```\n\n\u003Cimg alt=\"Bullet list Style\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F4838076\u002F73212458-328f7500-4146-11ea-826f-576059c4644e.png\" width=\"500px\" \u002F>\n\n### Custom Style\n\nFor the custom mode, use the\n[online tool](https:\u002F\u002Fdanilowoz.com\u002Fcreate-content-loader).\n\n```jsx\nconst MyLoader = () => (\n  \u003CContentLoader\n    height={140}\n    speed={1}\n    backgroundColor={'#333'}\n    foregroundColor={'#999'}\n    viewBox=\"0 0 380 70\"\n  >\n    {\u002F* Only SVG shapes *\u002F}\n    \u003Crect x=\"0\" y=\"0\" rx=\"5\" ry=\"5\" width=\"70\" height=\"70\" \u002F>\n    \u003Crect x=\"80\" y=\"17\" rx=\"4\" ry=\"4\" width=\"300\" height=\"13\" \u002F>\n    \u003Crect x=\"80\" y=\"40\" rx=\"3\" ry=\"3\" width=\"250\" height=\"10\" \u002F>\n  \u003C\u002FContentLoader>\n)\n```\n\n![Custom](https:\u002F\u002Fuser-images.githubusercontent.com\u002F4838076\u002F36352947-b87019a8-149e-11e8-99ba-c71c2bcf8733.gif)\n\n## Troubleshooting\n\n#### Responsive - Mobile version\n\nIn order to avoid unexpected behavior, the package doesn't have opinioned settings. So if it needs to be responsive, have in mind that the output of the package is a regular SVG, so it just needs the same attributes to become a regular SVG responsive, which means:\n\n```jsx\nimport { Code } from 'react-content-loader'\n\nconst MyCodeLoader = () => (\n  \u003CCode\n    width={100}\n    height={100}\n    viewBox=\"0 0 100 100\"\n    style={{ width: '100%' }}\n  \u002F>\n)\n```\n\n#### Server-side rendering (SSR) - Match snapshot\n\nAs the main component generates random values to match the id of the SVG element with background style, it can encounter unexpected errors and unmatching warning on render, once the random value of id will be generated twice, in case of SSR: server and client; or in case of snapshot test: on the first match and re-running the test.\n\nTo fix it, set the prop [`uniqueKey`](https:\u002F\u002Fgithub.com\u002Fdanilowoz\u002Freact-content-loader#uniquekey-string---web-only), then the id will not be random anymore:\n\n```jsx\nimport { Facebook } from 'react-content-loader'\n\nconst MyFacebookLoader = () => \u003CFacebook uniqueKey=\"my-random-value\" \u002F>\n```\n\n#### **Alpha is not working: Safari \u002F iOS**\n\nWhen using `rgba` as a `backgroundColor` or `foregroundColor` value, [Safari does not respect the alpha channel](https:\u002F\u002Fgithub.com\u002Fw3c\u002Fsvgwg\u002Fissues\u002F180), meaning that the color will be opaque. To prevent this, instead of using a `rgba` value for `backgroundColor`\u002F`foregroundColor`, use the `rgb` equivalent and move the alpha channel value to the `backgroundOpacity`\u002F`foregroundOpacity` props.\n\n```jsx\n{\u002F* Opaque color in Safari and iOS *\u002F}\n\u003CContentLoader\n  backgroundColor=\"rgba(0,0,0,0.06)\"\n  foregroundColor=\"rgba(0,0,0,0.12)\">\n\n\n{\u002F_ Semi-transparent color in Safari and iOS _\u002F}\n\u003CContentLoader\n    backgroundColor=\"rgb(0,0,0)\"\n    foregroundColor=\"rgb(0,0,0)\"\n    backgroundOpacity={0.06}\n    foregroundOpacity={0.12}>\n\n\n```\n\n#### **Black box in Safari \u002F iOS (again)**\n\nUsing the base tag on a page that contains SVG elements fails to render and it looks like a black box. Just remove the **base-href** tag from the `\u003Chead \u002F>` and the issue has been solved.\n\n\u003Cimg width=\"350\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F11562881\u002F39406054-2f308de6-4bce-11e8-91fb-bbb35e29fc10.png\" alt=\"black box\" \u002F>\n\nSee: [#93](https:\u002F\u002Fgithub.com\u002Fdanilowoz\u002Freact-content-loader\u002Fissues\u002F93) \u002F [109](https:\u002F\u002Fgithub.com\u002Fdanilowoz\u002Freact-content-loader\u002Fissues\u002F109)\n\n#### Browser supports SVG-Animate\n\nOld browsers don't support animation in SVG ([compatibility list](https:\u002F\u002Fcaniuse.com\u002F#search=SVGAnimateElement)), and if your project must support IE, for examples, here's a couple of ways to make sure that browser supports SVG Animate:\n\n- `window.SVGAnimateElement`\n- `document.implementation.hasFeature(\"http:\u002F\u002Fwww.w3.org\u002FTR\u002FSVG11\u002Ffeature#SVG-Animation\", \"1.1\")`\n- Or even use https:\u002F\u002Fmodernizr.com\u002F\n\n## Similar packages\n\n- React Native: [rn-placeholder](https:\u002F\u002Fgithub.com\u002Fmfrachet\u002Frn-placeholder), [react-native-svg-animated-linear-gradient](https:\u002F\u002Fgithub.com\u002Fvirusvn\u002Freact-native-svg-animated-linear-gradient);\n- [Preact](https:\u002F\u002Fgithub.com\u002Fbonitasoft\u002Fpreact-content-loader);\n- Vue.js: [vue-content-loading](https:\u002F\u002Fgithub.com\u002FLucasLeandro1204\u002Fvue-content-loading), [vue-content-loader](https:\u002F\u002Fgithub.com\u002Fegoist\u002Fvue-content-loader);\n- Angular: [ngx-content-loading](https:\u002F\u002Fgithub.com\u002FGbuomprisco\u002Fngx-content-loading), [ngx-content-loader](https:\u002F\u002Fgithub.com\u002FNetanelBasal\u002Fngx-content-loader).\n\n---\n\n## Development\n\nFork the repo and then clone it\n\n```\n$ git clone git@github.com:YourUsername\u002Freact-content-loader.git && cd react-content-loader\n```\n\n`$ npm i`: Install the dependencies;\n\n`$ npm run build`: Build to production;\n\n`$ npm run dev`: Run the Storybook to see your changes;\n\n`$ npm run test`: Run all tests: type checking, unit tests on web and native;\n\n`$ npm run test:watch`: Watch unit tests;\n\n### React Native\n\nAs React Native doesn't support symbolic links (to link the dependency to another folder) and as there is no playground to check your contributions (like storybook), this is recommended strategy to run the project locally:\n\n1. Create a new React Native from scratch, either Metro or create-react-native-app;\n2. Install the dependency to your root project:\n   `yarn add react-content-loader react-native-svg`\n3. Open the project just created and clone this repository there;\n4. Create your loading component and point the `react-content-loader` to the project just cloned, like:\n   `import ContentLoader, { Rect, Circle } from '.\u002Freact-content-loader\u002Fnative'`\n\n### Commit messages\n\nCommit messages should follow the [commit message convention](https:\u002F\u002Fconventionalcommits.org\u002F) so, changelogs could be generated automatically by that. Commit messages are validated automatically upon commit. If you aren't familiar with the commit message convention, you can use yarn commit (or `npm run commit`) instead of git commit, which provides an interactive CLI for generating proper commit messages.\n\n## License\n\n[MIT](https:\u002F\u002Fgithub.com\u002Fdanilowoz\u002Freact-content-loader\u002Fblob\u002Fmaster\u002FLICENSE)\n","react-content-loader 是一个基于 SVG 的 React 组件，用于轻松创建占位符加载效果（如 Facebook 的卡片加载）。其核心功能包括高度可定制性，支持自定义颜色、速度、尺寸及RTL布局；提供多种预设样式和在线工具便于用户快速上手或DIY个性化加载动画；同时兼容React Native环境，保持一致的API接口与强大特性。该项目体积轻巧，Web版本小于2kB且无外部依赖，非常适合需要优化用户体验、减少页面空白时间的各种Web应用及移动应用开发场景中使用。",2,"2026-06-11 03:26:35","top_topic"]