Overview
The App component wraps your entire application to provide global configurations for all Nuxt UI components. It implements Reka UI’s ConfigProvider, ToastProvider, and TooltipProvider to enable consistent behavior across your application.Usage
Wrap your entire application with the App component in yourapp.vue file:
app.vue
With locale configuration
Control the locale and reading direction for your application:app.vue
Custom tooltip configuration
Configure global tooltip behavior:app.vue
Disable toaster
If you don’t need toast notifications:app.vue
Props
Controls whether the body element should scroll when modals or overlays are open.
The global reading direction for all components. Inherited by all child components.
Global configuration for tooltips throughout the application.
Configuration for toast notifications. Set to
null to disable toaster entirely.Locale configuration for internationalization and formatting.
Target element for portal-rendered content like modals and popovers. Can be a boolean, CSS selector string, or DOM element.
Slots
default
The main content of your application (typically
<NuxtPage /> or your root component).Features
Global reading direction
Enables all components to inherit and respect the global reading direction (LTR/RTL), ensuring proper layout and text direction throughout your application.Scroll body control
Prevents layout shifts by managing body scroll behavior when overlays (modals, dialogs, etc.) are open.Unified providers
- ConfigProvider: Provides global configuration to all Reka UI primitives
- TooltipProvider: Enables smart tooltip behavior with delay management
- ToastProvider: Powers the notification system with programmatic toast control
- OverlayProvider: Manages modals and slideovers
Best practices
The App component uses Reka UI’s
useId() function to generate unique IDs for accessibility, ensuring proper ARIA relationships across your application.The locale configuration affects date and time formatting in components like Calendar, InputDate, and InputTime. Make sure to set it according to your application’s requirements.