{"id":13525647,"url":"https://github.com/fakundo/preact-transitioning","last_synced_at":"2025-10-25T11:03:33.257Z","repository":{"id":40289473,"uuid":"241641703","full_name":"fakundo/preact-transitioning","owner":"fakundo","description":"Preact components for easily implementing basic CSS animations and transitions","archived":false,"fork":false,"pushed_at":"2025-10-22T13:59:43.000Z","size":2309,"stargazers_count":48,"open_issues_count":5,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-22T15:36:37.068Z","etag":null,"topics":["animation","preact","transition","transition-group"],"latest_commit_sha":null,"homepage":"https://fakundo.github.io/preact-transitioning/","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/fakundo.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-19T14:25:46.000Z","updated_at":"2025-10-22T13:59:01.000Z","dependencies_parsed_at":"2024-05-02T03:49:08.792Z","dependency_job_id":"000d67c6-c2fd-4135-9d99-5713728921af","html_url":"https://github.com/fakundo/preact-transitioning","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.11538461538461542","last_synced_commit":"913215d4120c8c04b43c4f63a3ed667619522524"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fakundo/preact-transitioning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fpreact-transitioning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fpreact-transitioning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fpreact-transitioning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fpreact-transitioning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fakundo","download_url":"https://codeload.github.com/fakundo/preact-transitioning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fpreact-transitioning/sbom","scorecard":{"id":391710,"data":{"date":"2025-08-11","repo":{"name":"github.com/fakundo/preact-transitioning","commit":"862197878b4cbf99e2a24a90b417229e35c94edb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":3,"reason":"Found 9/30 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build-deploy-docs.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-deploy-docs.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/fakundo/preact-transitioning/build-deploy-docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-deploy-docs.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/fakundo/preact-transitioning/build-deploy-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/fakundo/preact-transitioning/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fakundo/preact-transitioning/publish.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"32 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T17:58:31.154Z","repository_id":40289473,"created_at":"2025-08-18T17:58:31.154Z","updated_at":"2025-08-18T17:58:31.154Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280943396,"owners_count":26417747,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","preact","transition","transition-group"],"created_at":"2024-08-01T06:01:20.719Z","updated_at":"2025-10-25T11:03:33.251Z","avatar_url":"https://github.com/fakundo.png","language":"TypeScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# preact-transitioning\n\n[![npm](https://img.shields.io/npm/v/preact-transitioning.svg)](https://www.npmjs.com/package/preact-transitioning)\n[![GitHub](https://img.shields.io/badge/GitHub-%23121011.svg?logo=github\u0026logoColor=white)](https://github.com/fakundo/preact-transitioning)\n\nA library that provides components for managing animations and transitions with ease. It allows seamless transitions for both individual components and groups of elements. Lightweight and has no dependencies. Inspired by [react-transition-group](https://reactcommunity.org/react-transition-group/) and has almost the same API.\n\n```tsx\n\u003cFadeTransition in={visible}\u003e\n  \u003cdiv\u003eFading element\u003c/div\u003e\n\u003c/FadeTransition\u003e\n```\n\n## Installation\n\nTo install `preact-transitioning`, run the following command in your project:\n\n```bash\nnpm install preact-transitioning\n# or\nyarn add preact-transitioning\n```\n\n## Documentation\n\nFor more detailed information and usage examples, check out the [Docs](https://fakundo.github.io/preact-transitioning/).\n\n## Quick Review\n\n### Transition Component\n\nThe `Transition` component allows you to control the mounting and unmounting of an element with transitions.\n\n```tsx\nimport { Transition } from 'preact-transitioning'\n\n...\n\n\u003cTransition in={!hidden} appear exit={false}\u003e\n  {(transitionState) =\u003e (\n    \u003cpre\u003e{JSON.stringify(transitionState)}\u003c/pre\u003e\n  )}\n\u003c/Transition\u003e\n```\n\n### CSSTransition Component\n\nThe `CSSTransition` component applies CSS classes based on the current transition state.\n\n```tsx\nimport { CSSTransition } from 'preact-transitioning'\n\n...\n\n\u003cCSSTransition in={!hidden} classNames=\"fade\"\u003e\n  \u003cdiv\u003eAnimated element\u003c/div\u003e\n\u003c/CSSTransition\u003e\n```\n\n### StyleTransition Component\n\nThe `StyleTransition` component applies inline styles based on the current transition state. This is useful for customizing transitions without external CSS.\n\n```tsx\nimport { StyleTransition } from 'preact-transitioning'\n\n...\n\n\u003cStyleTransition \n  in={!hidden} \n  duration={300} \n  styles={{\n    enter: { opacity: 0 },\n    enterActive: { opacity: 1 },\n  }}\n\u003e\n  \u003cdiv style={{ transition: 'opacity 300ms' }}\u003eAnimated element\u003c/div\u003e\n\u003c/StyleTransition\u003e\n```\n\n### TransitionGroup Component\n\nThe `TransitionGroup` component handles a set of elements, animating them as they are added or removed from the DOM.\n\n```tsx\nimport { TransitionGroup } from 'preact-transitioning'\n\n...\n\n\u003cTransitionGroup duration={300}\u003e\n  {items.map((item) =\u003e (\n    \u003cCSSTransition key={item.key} classNames=\"fade\"\u003e\n      \u003cdiv\u003e{item.label}\u003c/div\u003e\n    \u003c/CSSTransition\u003e\n  ))}\n\u003c/TransitionGroup\u003e\n```\n\n## Component Props\n\n### TransitionProps\n\n```ts\ntype TransitionProps = {\n  children: (transitionState: TransitionState, activePhase: Phase) =\u003e ComponentChildren;\n  in?: boolean;\n  appear?: boolean;\n  enter?: boolean;\n  exit?: boolean;\n  duration?: number;\n  alwaysMounted?: boolean;\n  addEndListener?: (node: Element | Text, done: () =\u003e void) =\u003e void;\n  onEnter: () =\u003e void;\n  onEntering: () =\u003e void;\n  onEntered: () =\u003e void;\n  onExit: () =\u003e void;\n  onExiting: () =\u003e void;\n  onExited: () =\u003e void;\n}\n```\n\nThe `TransitionState` passed to the children function has the following structure:\n\n```ts\ntype TransitionState = {\n  appear: boolean;\n  appearActive: boolean;\n  appearDone: boolean;\n  enter: boolean;\n  enterActive: boolean;\n  enterDone: boolean;\n  exit: boolean;\n  exitActive: boolean;\n  exitDone: boolean;\n}\n```\n\n### CSSTransitionProps\n\n```ts\ntype CSSTransitionProps = Omit\u003cTransitionProps, 'children'\u003e \u0026 {\n  children: VNode\u003c{ class?: any; }\u003e;\n  classNames: string | {\n    appear?: string;\n    appearActive?: string;\n    appearDone?: string;\n    enter?: string;\n    enterActive?: string;\n    enterDone?: string;\n    exit?: string;\n    exitActive?: string;\n    exitDone?: string;\n  };\n}\n```\n\nif `classNames` is a string, then the computed `className` will be suffixed based on the current transition state. \nFor example, when `classNames` is `\"fade\"`, the `fade-appear-active` class will be applied during the `appearActive` phase.\n\nIf `classNames` is an object, the final `className` will be taken from that object based on the current transition state.\n\n### StyleTransitionProps\n\n```ts\ntype StyleTransitionProps = Omit\u003cTransitionProps, 'children'\u003e \u0026 {\n  children: VNode\u003c{ style?: any; }\u003e;\n  styles: {\n    appear?: object;\n    appearActive?: object;\n    appearDone?: object;\n    enter?: object;\n    enterActive?: object;\n    enterDone?: object;\n    exit?: object;\n    exitActive?: object;\n    exitDone?: object;\n  };\n}\n```\n\nThe `styles` prop allows you to define inline styles based on the current transition state. For example, when the element enters, the `enterActive` styles will be applied.\n\n### TransitionGroupProps\n\n```ts\ntype TransitionGroupProps = {\n  children: ComponentChildren;\n  appear?: boolean;\n  enter?: boolean;\n  exit?: boolean;\n  duration?: number;\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffakundo%2Fpreact-transitioning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffakundo%2Fpreact-transitioning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffakundo%2Fpreact-transitioning/lists"}