Closed nisharmultani closed 4 months ago
In toast options, you can set the closeButton's className or style and override its left/right position. Here's what I just did to flip it from the left to right side using CSS though:
:where([data-sonner-toaster][dir='ltr'] button[data-close-button]) {
--toast-close-button-start: auto;
--toast-close-button-end: 0;
--toast-close-button-transform: translate(35%, -35%);
}
:where([data-sonner-toaster][dir='rtl'] button[data-close-button]) {
--toast-close-button-start: 0;
--toast-close-button-end: auto;
--toast-close-button-transform: translate(-35%, -35%);
}
can you give me a proper solution, please <Toaster closeButton />
You can target individual elements like so https://sonner.emilkowal.ski/styling#tailwind-css
Describe the feature / bug 📝:
Steps to reproduce the bug 🔁:
1. 2. 3.