{"id":13473497,"url":"https://github.com/argyleink/morphull","last_synced_at":"2025-04-07T10:27:42.373Z","repository":{"id":169098714,"uuid":"644996510","full_name":"argyleink/morphull","owner":"argyleink","description":"Astro starter powered by MPA view transitions","archived":false,"fork":false,"pushed_at":"2024-07-12T17:59:37.000Z","size":68,"stargazers_count":234,"open_issues_count":1,"forks_count":27,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T13:30:42.377Z","etag":null,"topics":["css","slides","view-transitions"],"latest_commit_sha":null,"homepage":"https://smashing-transitions.netlify.app/","language":"Astro","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/argyleink.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}},"created_at":"2023-05-24T17:37:50.000Z","updated_at":"2025-03-19T16:37:25.000Z","dependencies_parsed_at":"2024-11-14T02:01:01.664Z","dependency_job_id":"90592ba7-2595-446b-b1b9-3580ff720e97","html_url":"https://github.com/argyleink/morphull","commit_stats":null,"previous_names":["argyleink/morphull"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argyleink%2Fmorphull","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argyleink%2Fmorphull/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argyleink%2Fmorphull/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argyleink%2Fmorphull/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/argyleink","download_url":"https://codeload.github.com/argyleink/morphull/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247634690,"owners_count":20970585,"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":["css","slides","view-transitions"],"created_at":"2024-07-31T16:01:04.207Z","updated_at":"2025-04-07T10:27:42.346Z","avatar_url":"https://github.com/argyleink.png","language":"Astro","funding_links":[],"categories":["Astro"],"sub_categories":[],"readme":"# Morphull - Astro Starter Kit\n\nA morphing or full page transition enabled slide creation starter kit that uses [View Transitions](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API) to do all the work. \n\nUntil View Transitions are supported across all browsers, this API and starter kit only works in [Chrome Canary](https://www.google.com/chrome/canary/) with [chrome://flags/#view-transition-on-navigation](chrome://flags/#view-transition-on-navigation) enabled.\n\n## 🚀 Project Structure\n\nInside the `/pages` folder you create your slides, each slide is it's own Astro component that uses the `/src/layouts/Slide.astro` layout.\n\nThere's one component called `Controls.astro` that handles making and placing the next arrow.\n\n## How to get morphing slide pages\n\nIt's all generally handled for you! Just use `\u003ch1\u003e` elements, or images or links. Inside the `/src/styles/transitions.css` you'll find the unique names given to the elements that tells the browser which shared elements should morph. Like if you have a code snippet on one page, and the next page also has one, the browser will transition between those snippets.\n\n### Enabling page transitions\n\nFull page transitions can be enabled on a per slide basis, by simply passing `animation=\"page\"` as a property to the `Layout` / `Slide` component. This will on the other hand will automatically disable slide page morphing.\n\n### Writing custom page transitions\n\nTo write custom page transitions, you can simply hook into the functionality already provided by morphull. Currently, there are two data attributes that are written to the `\u003chtml\u003e` when the page is initialized that form the basis for all animations.\n\n| Attribute | Values | Description |\n| --- | --- | --- |\n| `data-view-transition-direction` | `'forward'`, `'back'`, `'reload'` | The direction of navigation. Reload means that a page refresh is initiated. |\n| `data-view-transition` | `'page'`, `'element'`, Custom | Default: `'element'`. \u003cbr\u003e  Animation identifier used within CSS |\n\nWith the help of these attributes and open-props custom page transitions can be written as easy as:\n\n```css\n  html:not([data-view-transition-direction=\"reload\"])[data-view-transition=\"slide\"] {\n    \u0026::view-transition-new(root) {\n      animation: var(--animation-slide-in-left) forwards;\n    }\n\n    \u0026::view-transition-old(root) {\n      animation: var(--animation-slide-out-left) forwards;\n    }\n\n    \u0026[data-view-transition-direction=\"back\"] {\n      \u0026::view-transition-new(root) {\n        animation: var(--animation-slide-in-right) forwards;\n      }\n\n      \u0026::view-transition-old(root) {\n        animation: var(--animation-slide-out-right) forwards;\n      }\n    }\n  }\n```\nIn particular, we use `:not([data-view-transition-direction=\"reload\"])` in this example to prevent transitions from being replayed on page refresh. There is currently an ongoing discussion about this behavior right [here](https://github.com/w3c/csswg-drafts/issues/8784).\nA working example identical to the code above can be found in `src/pages/example-3.astro`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargyleink%2Fmorphull","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargyleink%2Fmorphull","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargyleink%2Fmorphull/lists"}