diff --git a/docs/content/2.composables/use-overlay.md b/docs/content/2.composables/use-overlay.md index d8c7fb46..f5aea094 100644 --- a/docs/content/2.composables/use-overlay.md +++ b/docs/content/2.composables/use-overlay.md @@ -1,6 +1,6 @@ --- title: useOverlay -description: "A composable to programmatically control overlays." +description: 'A composable to programmatically control overlays.' --- ## Usage @@ -9,9 +9,11 @@ Use the auto-imported `useOverlay` composable to programmatically control [Modal ```vue ``` In this example, we're using the `useOverlay` composable to control multiple modals and slideovers. + +## Caveats + +### Provide / Inject + +When opening overlays programmatically (e.g. modals, slideovers, etc), the overlay component can only access injected values from the component containing `UApp` (typically `app.vue` or layout components). This is because overlays are mounted outside of the page context by the `UApp` component. + +As such, using `provide()` in pages or parent components isn't supported directly. To pass provided values to overlays, the recommended approach is to use props instead: + +```vue + +``` \ No newline at end of file