{"id":13578169,"url":"https://github.com/Jrschellenberg/peact-loading-skeleton","last_synced_at":"2025-04-05T16:31:59.416Z","repository":{"id":57321617,"uuid":"181383770","full_name":"Jrschellenberg/peact-loading-skeleton","owner":"Jrschellenberg","description":"Fork of React-Loading-Skeleton to be ported for Preact Projects","archived":false,"fork":false,"pushed_at":"2019-04-15T00:11:10.000Z","size":323,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T11:18:15.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Jrschellenberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-15T00:04:57.000Z","updated_at":"2022-07-20T04:27:26.000Z","dependencies_parsed_at":"2022-08-25T22:41:32.669Z","dependency_job_id":null,"html_url":"https://github.com/Jrschellenberg/peact-loading-skeleton","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jrschellenberg%2Fpeact-loading-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jrschellenberg%2Fpeact-loading-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jrschellenberg%2Fpeact-loading-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jrschellenberg%2Fpeact-loading-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jrschellenberg","download_url":"https://codeload.github.com/Jrschellenberg/peact-loading-skeleton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247366402,"owners_count":20927501,"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":[],"created_at":"2024-08-01T15:01:28.106Z","updated_at":"2025-04-05T16:31:59.088Z","avatar_url":"https://github.com/Jrschellenberg.png","language":"JavaScript","readme":"# peact-loading-skeleton\n\nThis is a Port from react-loading-skeleton.\nAll Credit goes to original author. To see Project please go [here](https://github.com/dvtng/react-loading-skeleton)\n\nMake beautiful, animated loading skeletons that automatically adapt to your app.\n\n![Gif of skeleton in action](https://media.giphy.com/media/l0Iyk4bAAjac3AU2k/giphy.gif)\n\n## Basic usage\n\nInstall by `npm`/`yarn` with `react-loading-skeleton`.\n\n```javascript\nimport Skeleton from 'react-loading-skeleton';\n\n\u003cSkeleton/\u003e // Simple, single-line loading skeleton\n\u003cSkeleton count={5}/\u003e // Five-line loading skeleton\n```\n\n## Principles\n\n### Adapts to the styles you have defined\n\nThe `\u003cSkeleton\u003e` component is designed to be used directly in your components,\nin place of content while it's still loading.\nUnlike other libraries, rather than meticulously crafting a skeleton screen to\nmatch the `font-size`, `line-height` or `margin`s your content takes on,\nuse a `\u003cSkeleton\u003e` component to have it automatically fill the correct dimensions.\n\nFor example:\n\n```javascript\nclass Blogpost extends Component {\n  render() {\n    return (\n      \u003cdiv style={{ fontSize: 20, lineHeight: 2 }}\u003e\n        \u003ch1\u003e{this.props.title || \u003cSkeleton /\u003e}\u003c/h1\u003e\n        {this.props.body || \u003cSkeleton count={10} /\u003e}\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\n...will produce the correctly-sized skeletons for the heading and body sections\nwithout any further configuration of the `\u003cSkeleton\u003e` component.\n\nThis ensures the loading state remains up-to-date with any changes\nto your layout or typography.\n\n### Don't make dedicated skeleton screens\n\nInstead, make components with _built-in_ skeleton states.\n\nIn addition to keeping the styling in-sync, here are some other reasons to do this:\n\n1.  Components represent all possible states it can be in - loading included.\n1.  It allows for more flexible loading patterns - in the `Blogpost` example, it's possible to have the `title` load first, and then the `body`, while having both pieces of content show loading skeletons at the right time.\n\n## Theming\n\nUsing a `\u003cSkeletonTheme\u003e` component, you can easily change the colors of all\nskeleton components below it in the React hierarchy:\n\n```javascript\nimport Skeleton, { SkeletonTheme } from \"react-loading-skeleton\";\n\n\u003cSkeletonTheme color=\"#202020\" highlightColor=\"#444\"\u003e\n  \u003cp\u003e\n    \u003cSkeleton count={3} /\u003e\n  \u003c/p\u003e\n\u003c/SkeletonTheme\u003e;\n```\n\n## Duration\n\n```javascript\n\u003cSkeleton duration={2} /\u003e\n```\n\n`duration`: Number, defaults to 1.2\n\nDuration is how long it takes do one cycle of the skeleton animation.\n\n## Width\n\n`width`: Number | String | null, defaults to null\n\n```javascript\n\u003cSkeleton width={100} /\u003e\n```\n\nWidth of the skeleton. Useful when the skeleton is inside an inline element with\nno width of its own.\n\n## Height\n\n`Height`: Number | String | null, defaults to null\n\n```javascript\n\u003cSkeleton height={100} /\u003e\n```\n\nHeight of the skeleton. Useful when you don't want to adapt the skeleton to a text element but for instance\na card. Also needed for the prop `circle` (see below).\n\n## Circle\n\n`Circle`: Boolean | false, defaults to false\n\n```javascript\n\u003cSkeleton circle={true} height={50} width={50} /\u003e\n```\n\nProp for making the skeleton look like a circle, for when you are creating a user card with a profile picture for instance.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJrschellenberg%2Fpeact-loading-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJrschellenberg%2Fpeact-loading-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJrschellenberg%2Fpeact-loading-skeleton/lists"}