You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are working with a server rendered web application using tools like [HTMX](https://htmx.org/)you can trigger events using [custom events](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) dispatched on the `window`
107
+
As of version 5 you can trigger notifications using [custom events](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) dispatched on the `window`.
107
108
108
109
```typescript
109
110
const event =newCustomEvent("notify:sonner", {
@@ -126,7 +127,7 @@ The `detail` object accepts the same interfaces as the function versions (see be
126
127
127
128
### Custom Event Callbacks
128
129
129
-
As of version 5 all callback interfaces support `event` and `eventData` properties. When the user interacts with but button a custom event will be fired on the `window`.
130
+
As of version 5 all callback interfaces support `event` and `eventData` properties. When the user interacts with a button a custom event will be fired on the `window`.
130
131
131
132
```typescript
132
133
importsonnerfrom"@codewithkyle/notifyjs/sonner";
@@ -266,7 +267,19 @@ type ToastNotification = {
266
267
267
268
## Sonner
268
269
269
-
Sonner notifications are great for simple temporary alerts.
270
+
Sonner notifications are great for simple temporary alerts. The Sonner notification is slightly opinionated due to the custom interaction and animations.
0 commit comments