Toast config Nuxt UI
Cannot seem to get my Toast notifications to show anywhere but across the entire bottom of the screen... Is there some config I am missing? I am reading the docs and it seems this should work 🧐 . Any help is appreciated!
app.config.ts
login.vue
nuxt.config.ts
5 Replies
Hi @parakoopa. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources and your configuration, it seems you're on the right track, but there might be a small issue in your configuration. Let's address this step by step:
1. First, make sure you have added the
<UNotifications />
component to your app, preferably inside app.vue
. This is crucial for the notifications to appear. According to the Nuxt UI Notification documentation, you should have something like this in your app.vue
:
2. Your app.config.ts
configuration looks correct. However, there's a small adjustment you might want to make. According to the documentation, the default position is bottom-0 end-0
. Your current configuration:
This should position the notifications at the top of the screen. If you want them at the top-right, you can modify it to:
3. Your login.vue
code for adding a toast notification looks correct.
4. The nuxt.config.ts
file seems fine and doesn't interfere with the notification system.
If you've implemented all these steps and the notifications are still appearing at the bottom of the screen, there might be a CSS issue overriding the positioning. You can try inspecting the notification element in your browser's developer tools to see if there are any conflicting styles.
If the problem persists, you might want to try setting the position directly on the <UNotifications />
component as a prop:
Remember that the changes in app.config.ts
might require a restart of your Nuxt development server to take effect.
If none of these solutions work, it's possible there might be a bug or conflict with other parts of your application that aren't visible in the provided code snippets. In that case, you might want to create a minimal reproduction of the issue and seek further assistance from the Nuxt UI community or maintainers.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@291353299142049793> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
These changes did not seem to have any effect
/app.config.ts
/pages/index.vue
onMounted + Timeout is to mimic an event
Do you have useToast() defined on the page triggering the notification along with <UNotifications> in the template?
The three images show different position settings set in /app.config.ts



Additionally '@nuxtjs/tailwindcss' ought to be removed from package.json, and nuxt.config.ts, because nuxt/ui is already importing it.
From my understanding the tailwindcss module can cause conflicts with the nuxt/ui package.
/package.json
/nuxt.config.ts
Did you have any success with the changes @parakoopa ?