Pages and themes

Navigation

This page and the next one move with Nuxt's view transitions. The theme switch keeps working here.

Try it

Move between the two pages, then switch the theme. Or start both at once and see which one gives way.

Go to the second page

One at a time

Page transitions and theme transitions never run together. Starting a second view transition would cancel the first and leave a navigation half done, so nuxt-penumbra applies a theme change that arrives during a navigation at once, without its effect.

Setup

The flag in the config turns on Nuxt's page transitions for the whole app. The page meta opts a page in explicitly, and false opts one out.

nuxt.config.ts
export default defineNuxtConfig({
  experimental: { viewTransition: true },
})
The page
definePageMeta({ viewTransition: true })