{"id":32114925,"url":"https://github.com/etaque/elm-transit","last_synced_at":"2026-02-21T17:02:30.458Z","repository":{"id":62418474,"uuid":"47067909","full_name":"etaque/elm-transit","owner":"etaque","description":"Delayed actions with transition progress for enter/exit animations in Elm.","archived":false,"fork":false,"pushed_at":"2018-10-18T08:01:57.000Z","size":42,"stargazers_count":54,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-19T05:39:14.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elm","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/etaque.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":"2015-11-29T15:05:24.000Z","updated_at":"2021-03-22T01:14:29.000Z","dependencies_parsed_at":"2022-11-01T16:47:01.747Z","dependency_job_id":null,"html_url":"https://github.com/etaque/elm-transit","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/etaque/elm-transit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etaque%2Felm-transit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etaque%2Felm-transit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etaque%2Felm-transit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etaque%2Felm-transit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etaque","download_url":"https://codeload.github.com/etaque/elm-transit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etaque%2Felm-transit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29688216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2025-10-20T15:38:11.716Z","updated_at":"2026-02-21T17:02:30.452Z","avatar_url":"https://github.com/etaque.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elm Transit\n\n    elm install etaque/elm-transit\n\nDelayed actions with transition progress for enter/exit animations in [Elm](https://elm-lang.org).\n\nSee also:\n\n* [elm-transit-style](https://package.elm-lang.org/packages/etaque/elm-transit-style/latest): animations for elm-html\n\n\n## Usage\n\n(Full working example [here](https://github.com/etaque/elm-transit/tree/master/example/src/Main.elm))\n\nUse `WithTransition` record extension to extend your own model:\n\n```elm\nimport Transit\n\n-- see recursive type param: Transit needs to know the type of message it will send delayed\ntype Msg\n  = NavigateTo Page\n  | SetPage Page\n  | TransitMsg (Transit.Msg Msg)\n\ntype Page = Page1 | Page2\n\ntype alias Model =\n  Transit.WithTransition { page: Page }\n```\n\nYou're not bound to root model, you can also use it for sub-pages or components transitions.\n\nThen wrap `Msg` in one of your action types and call `start` and\n`tick` in your update function.\n\n```elm\nupdate : Msg -\u003e Model -\u003e (Model, Cmd Msg)\nupdate action model =\n  case action of\n\n    NavigateTo page -\u003e\n      -- exit phase of 100ms, then `(SetPage page)` will be sent, then enter phase of 200ms\n      Transit.start TransitMsg (SetPage page) ( 100, 200 ) model\n\n    TransitMsg a -\u003e\n      Transit.tick TransitMsg a model\n        \n    SetPage page -\u003e\n      ({ model | page = page }, Cmd.none)\n```\n\nA subscription is necessary to receive animation frame ticks when transition is running:\n\n```elm\nsubscriptions : Model -\u003e Sub Msg\nsubscriptions model =\n  Transit.subscriptions TransitMsg model\n```\n\nIn your views, you can then either:\n\n* Use `getValue` to get the 1 -\u003e 0 -\u003e 1 varying Float, and `getStep` to know the current phase of transition.\n\n* Or use one of the provided functions in [elm-transit-style](https://package.elm-lang.org/packages/etaque/elm-transit-style/latest) (or create one of your own)\nto add the visual effect in your view:\n\n```elm\n  div (TransitStyle.fadeSlideLeft 50 model.transition) [ text \"Some content\" ]\n```\n\n## Credits\n\n* Thanks [Alex Galays](https://twitter.com/boubiyeah) for the challenge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetaque%2Felm-transit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetaque%2Felm-transit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetaque%2Felm-transit/lists"}