Description
Currently, toast notifications (Sonner) appear at the bottom of the screen by default. On mobile devices, this position is problematic because it overlaps and obstructs the bottom navigation bar (navbottom), hindering user interaction. In desktop environments, the bottom-right corner is the preferred position for visibility and standard UX.
Proposed Solution
Modify the Toaster component in components/ui/sonner.tsx to handle responsive positioning:
- Mobile (≤ 768px): Position toasts at the
top-right (or top-center as requested) to avoid navbottom overlap.
- Desktop (> 768px): Position toasts at the
bottom-right.
Tasks
Description
Currently, toast notifications (Sonner) appear at the bottom of the screen by default. On mobile devices, this position is problematic because it overlaps and obstructs the bottom navigation bar (navbottom), hindering user interaction. In desktop environments, the bottom-right corner is the preferred position for visibility and standard UX.
Proposed Solution
Modify the
Toastercomponent incomponents/ui/sonner.tsxto handle responsive positioning:top-right(ortop-centeras requested) to avoid navbottom overlap.bottom-right.Tasks
Toastercomponent.sonner.tsxto use dynamicpositionprop based on viewport width.