diff --git a/.changeset/new-monkeys-sit.md b/.changeset/new-monkeys-sit.md new file mode 100644 index 000000000000..b147b593f4a1 --- /dev/null +++ b/.changeset/new-monkeys-sit.md @@ -0,0 +1,32 @@ +--- +'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. + +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 + diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/keep-theme-one.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/keep-theme-one.astro index a4c942d587f2..18ae0221fc65 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/keep-theme-one.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/keep-theme-one.astro @@ -6,18 +6,18 @@ import Layout from '../components/Layout.astro'; go to next page