Open Evsio0n opened 1 month ago
have you made TestPage
a client component? that's the only issue i can see here @Evsio0n
@Evsio0n What resolutions are you testing it on? If you go below 640px, it might not appear because of the default class names added to Toast's Viewport element. I had to remove 'sm' class before 'right-0' class to show the toast on the mobile phones. Besides that, I don't see anything in your code that could break the toast...
Describe the bug
The Toaster component is not displaying on the screen when triggered. Despite following the setup instructions and ensuring the component is correctly imported and used, the toast notifications do not appear.
Affected component/components
Toast
How to reproduce
https://github.com/user-attachments/assets/3df8c6e3-c4c8-4e4b-b810-c17344f31eaf
Bug description:
The Toaster component, part of the shadcn/ui library, is not rendering on the page as expected. This issue persists despite using the recommended setup and usage patterns.
Set up a Next.js project and import the Toaster component from shadcn/ui. Add the Toaster component to a page and trigger it via a user action (e.g., clicking a button). Observe that no toast notification appears on the screen.
layout.tsx
Codesandbox/StackBlitz link
No response
Logs
System Info
Before submitting