#How to auto-dismis flashes after N amount of time
1 messages · Page 1 of 1 (latest)
Thanks, do u have any example code, I do know I can run JS with Liveview.JS but not sure how I would apply it..
I don't, but I would probably just create a hook (it's a LiveView thing, but they actually work with non-lv views as well, as long as you only need the mount() callback) so that when the flash element mounts with phx-hook="auto-dismiss" it just creates a timer to remove the element after x seconds.
tyvm, got it working