The correct way to wrap your Nuxt 3 application with the UApp component when using layouts is to place the NuxtLayout component inside the UApp component, like this:
<template>
<UApp>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</UApp>
</template>
According to the Nuxt UI documentation, the UApp component should be at the root of your application. It provides global configurations and is required for components like Toast and Tooltip to work properly, as well as programmatic overlays (modals and slideovers).
The UApp component implements Reka UI's ConfigProvider to provide global configuration to all components and uses ToastProvider and TooltipProvider to enable global toasts and tooltips functionality UI Components App.
This structure is also confirmed in the Nuxt UI installation guide, which recommends wrapping your app with the App component at the root level UI Installation for Nuxt.
In a typical Nuxt 3 application with layouts, your app.vue file should look like the example above, where:
UApp is the outermost component
NuxtLayout is inside it to handle your layouts
NuxtPage is inside the layout to render the current page
This structure ensures that all UI components like toasts and modals work correctly across your entire application, regardless of which layout or page is currently active.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: