-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toast #185
Comments
Hey @ftognetto, this is definitely something we plan to add! We're working on how to best approach it since the toast is typically a singleton component that is placed on the root layout and then invoked via a function! |
How I'm currently using this in my project: I created a Toaster component which can be placed in the root layout. This contains a portal and loops through the toasts as provided by the state from the melt builder. Users can add new toasts by invoking an imported function from a centralized util. I like the example Melt provides too, where it uses the Svelte context module instead https://svelte.dev/docs/svelte-components#script-context-module to expose the helper function |
Hi yes me too I made a temp version for this, using melt and applying shadcn style
Then in +layout.svelte
|
Any updates on this one? |
MeltUI is growing so fast, I hope to see this component here too |
@huntabyte Shadcn UI just introduced this new toast https://ui.shadcn.com/docs/components/sonner. Which is a standard react library installed from npm. Thus being able to import and call functions such as |
Why can't just use sonner? What's the difference? |
@peprmint1 They already use sonner: https://www.shadcn-svelte.com/docs/components/sonner |
I've noticing it before I posted in this, I thought that sonner was not intended to be use as toasts but it's serves the same purpose anyway. |
I'm also using Sonner at the moment. I don't know if @huntabyte wants to proceed with the development of Toast anyway but, as far as I'm concerned, this issue can be closed |
Having a Toast instead of a Sonner would be nice too. |
As a user looking for |
Yeah, the original shadcn/ui Toast feels like a worse Sonner, with no extra advantages. Renaming (or alisasing) Sonner to "Toast", and adding some configuration options (like showing only one toast at a time, or never hiding unless user closes them), would be more than sufficient here. What do you think @huntabyte? |
We're gonna keep Sonner named as such for the time being. Bits UI is being rewritten for Svelte 5 and may include a |
Describe the feature in detail (code, mocks, or screenshots encouraged)
Hello, is there any plan to add the toast component?
https://www.melt-ui.com/docs/builders/toast
Thank you I'm so happy I finally found a component library :)
What type of pull request would this be?
None
Provide relevant links or additional information.
No response
The text was updated successfully, but these errors were encountered: