{"id":19310429,"url":"https://github.com/daangn/simple-reveal","last_synced_at":"2025-04-22T13:34:18.277Z","repository":{"id":39904639,"uuid":"494047619","full_name":"daangn/simple-reveal","owner":"daangn","description":"A simple scroll animation library in React","archived":false,"fork":false,"pushed_at":"2024-02-10T12:41:58.000Z","size":45545,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-02T00:24:32.742Z","etag":null,"topics":["animation","react","scroll"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daangn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-19T11:43:41.000Z","updated_at":"2024-07-06T03:10:56.000Z","dependencies_parsed_at":"2024-02-10T13:44:30.179Z","dependency_job_id":null,"html_url":"https://github.com/daangn/simple-reveal","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/daangn%2Fsimple-reveal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daangn%2Fsimple-reveal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daangn%2Fsimple-reveal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daangn%2Fsimple-reveal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daangn","download_url":"https://codeload.github.com/daangn/simple-reveal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250249115,"owners_count":21399396,"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":["animation","react","scroll"],"created_at":"2024-11-10T00:24:10.590Z","updated_at":"2025-04-22T13:34:15.664Z","avatar_url":"https://github.com/daangn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleReveal\n\n![](https://img.shields.io/npm/v/simple-reveal)\n![](https://img.shields.io/npm/l/simple-reveal)\n![](https://img.shields.io/npm/dt/simple-reveal)\n![](https://img.shields.io/github/contributors/daangn/simple-reveal)\n![](https://img.shields.io/github/last-commit/daangn/simple-reveal)\n\nA simple scroll animation library in React\n\n- Zero-dependency\n- No additional DOM element\n- Simple and predictable API\n- SSR Support (Next.js, Gatsby)\n- Automatically compensates transition delay\n  - The delay only works when it is first revealed, and disables the delay when it is revealed when scrolling.\n- TypeScript Support\n- Respect `@media (prefers-reduced-motion)`\n\n## Demo\n\n[![Edit SimpleReveal Demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/simplereveal-demo-xzmf57?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## Getting started\n\n```bash\n$ yarn add simple-reveal\n```\n\n## How to use\n\nIf you have a component like this:\n\n```tsx\nimport React from \"react\";\n\nconst MyComponent: React.FC = () =\u003e {\n  return (\n    \u003cdiv\u003e\n      \u003ch1 className=\"title\"\u003eI want to put a reveal animation here\u003c/h1\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\nYou can add animations using `\u003cSimpleReveal /\u003e` component like this:\n\n```tsx\nimport \"simple-reveal/index.css\";\n\nimport React from \"react\";\nimport { SimpleReveal } from \"simple-reveal\";\n\nconst MyComponent: React.FC = () =\u003e {\n  return (\n    \u003cdiv\u003e\n      \u003cSimpleReveal\n        render={({ ref, cn, style }) =\u003e (\n          \u003ch1 ref={ref} className={cn(\"title\")} style={style}\u003e\n            I want to put a reveal animation here\n          \u003c/h1\u003e\n        )}\n        // options (optional)\n        duration={500}\n        delay={0}\n        initialTransform=\"translateY(1rem)\"\n      /\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\nOr you can use animation using `useSimpleReveal()` hook like this:\n\n```tsx\nimport \"simple-reveal/index.css\";\n\nimport React from \"react\";\nimport { useSimpleReveal } from \"simple-reveal\";\n\nconst MyComponent: React.FC = () =\u003e {\n  const { ref, cn, style } = useSimpleReveal({\n    duration: 500,\n    delay: 0,\n    initialTransform: \"translateY(1rem)\",\n  });\n\n  return (\n    \u003cdiv\u003e\n      \u003ch1 ref={ref} className={cn(\"title\")} style={style}\u003e\n        I want to put a reveal animation here\n      \u003c/h1\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\n## Contributors\n\n- [Tony](https://github.com/tonyfromundefined)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaangn%2Fsimple-reveal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaangn%2Fsimple-reveal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaangn%2Fsimple-reveal/lists"}