diff --git a/.changeset/new-monkeys-sit.md b/.changeset/new-monkeys-sit.md index b147b593f4a1..d71ab0b55ccb 100644 --- a/.changeset/new-monkeys-sit.md +++ b/.changeset/new-monkeys-sit.md @@ -2,11 +2,11 @@ 'astro': minor --- -Adds a new object `swapFunctions` to expose the necessary utility functions on `astro:transitions/client` that allow you to build custom swap functions to be used with view transitions. +Adds a new object `swapFunctions` to expose the necessary utility functions on `astro:transitions/client` that allow you to build custom swap functions to be used with view transitions. The example below uses these functions to replace Astro's built-in default `swap` function with one that only swaps the `
` part of the page: -```astro +```html ``` See the [view transitions guide](https://docs.astro.build/en/guides/view-transitions/#astrobefore-swap) for more information about hooking into the `astro:before-swap` lifecycle event and adding a custom swap implementation.