{"id":20626723,"url":"https://github.com/coreprocess/smooth-transition","last_synced_at":"2026-04-24T07:31:05.177Z","repository":{"id":65593143,"uuid":"594894487","full_name":"coreprocess/smooth-transition","owner":"coreprocess","description":"Smooth transition between React components.","archived":false,"fork":false,"pushed_at":"2023-01-31T21:00:42.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T23:21:06.774Z","etag":null,"topics":["component","css-transition","react","react-component","smooth-transition","smoothtransition","transition"],"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/coreprocess.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}},"created_at":"2023-01-29T23:54:25.000Z","updated_at":"2023-11-25T00:20:08.000Z","dependencies_parsed_at":"2023-02-16T23:00:31.954Z","dependency_job_id":null,"html_url":"https://github.com/coreprocess/smooth-transition","commit_stats":null,"previous_names":["teamrevin/smooth-transition"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coreprocess/smooth-transition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Fsmooth-transition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Fsmooth-transition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Fsmooth-transition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Fsmooth-transition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreprocess","download_url":"https://codeload.github.com/coreprocess/smooth-transition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreprocess%2Fsmooth-transition/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32214412,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["component","css-transition","react","react-component","smooth-transition","smoothtransition","transition"],"created_at":"2024-11-16T13:14:32.531Z","updated_at":"2026-04-24T07:31:05.161Z","avatar_url":"https://github.com/coreprocess.png","language":"TypeScript","readme":"# \u0026lt;SmoothTransition /\u0026gt;\n\n![npm version](https://badgen.net/npm/v/smooth-transition?icon=npm\u0026label)\n![GitHub checks](https://badgen.net/github/checks/teamrevin/smooth-transition/publish?icon=github\u0026label=GitHub)\n\n`\u003cSmoothTransition /\u003e` is a React component for elegantly transitioning between components. Its smooth fading effect and gliding height transition provides a seamless experience for your users as they switch between components.\n\n[![Demo Video](https://i.ytimg.com/vi/297wjIV2VN0/maxresdefault.jpg)](https://www.youtube.com/watch?v=297wjIV2VN0)\n([Demo Video](https://www.youtube.com/watch?v=297wjIV2VN0))\n\n## Installation\n\nUse your favourite manager to install the [package](https://www.npmjs.com/package/smooth-transition):\n\n```sh\nyarn add smooth-transition\n```\n\n```sh\nnpm install smooth-transition --save\n```\n\n## Example\n\n```ts\nimport { TextField, Typography } from \"@mui/material\";\nimport React, { ChangeEventHandler, forwardRef } from \"react\";\nimport { SmoothTransition } from \"smooth-transition\";\n\ntype Props = {\n    editMode: boolean;\n    value: string;\n    onChange: ChangeEventHandler\u003cHTMLInputElement | HTMLTextAreaElement\u003e;\n};\n\nexport const Example = forwardRef\u003cHTMLDivElement, Props\u003e(function Example(\n    { editMode, value, onChange },\n    ref\n) {\n    return (\n        \u003cSmoothTransition\n            render={[\n                (state) =\u003e (\n                    \u003cTypography ref={state != \"leave\" ? ref : undefined}\u003e\n                        {value}\n                    \u003c/Typography\u003e\n                ),\n                (state) =\u003e (\n                    \u003cTextField\n                        ref={state != \"leave\" ? ref : undefined}\n                        fullWidth\n                        multiline\n                        value={value}\n                        onChange={onChange}\n                    /\u003e\n                ),\n            ]}\n            active={!editMode ? 0 : 1}\n            duration={500}\n        /\u003e\n    );\n});\n```\n\n## Properties\n\nThe component accepts the following properties:\n\n-   `render: ((state: \"enter\" | \"active\" | \"leave\") =\u003e ReactNode)[]`: An array of render functions that return a `ReactNode`, representing the components that you want to transition between.\n-   `active: number`: An integer specifying which component should be displayed.\n-   `duration: number`: A number representing the duration of the transition in milliseconds.\n\n## License\n\nThis library is licensed under the MIT license.\n\n## Contributing\n\nWe welcome contributions to the `smooth-transition` library. To contribute, simply open a [pull request](https://github.com/teamrevin/smooth-transition/pulls) with your changes.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreprocess%2Fsmooth-transition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreprocess%2Fsmooth-transition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreprocess%2Fsmooth-transition/lists"}