useNotifications API
API reference for the useNotifications composable.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| useNotifications | Plugins |
| Snackbar | Semantic |
| createRegistry | Registration |
| createQueue | Registration |
| createPlugin | Foundation |
Functions
createNotifications
(_options?: NotificationsOptions) => NotificationsContext<NotificationTicketInput, NotificationTicket<NotificationTicketInput>>createNotificationsContext
<_E>(_options?: NotificationsPluginOptions | undefined) => ContextTrinity<_E>createNotificationsPlugin
(_options?: NotificationsPluginOptions | undefined) => PluginuseNotifications
<_E>(namespace?: string) => _EOptions
Properties
queue
QueueContext<QueueTicketInput<unknown>, QueueTicket<QueueTicketInput<unknown>>>The toast display queue. Access `queue.values()`, `queue.pause()`, `queue.resume()`.
Methods
seek
(direction?: "first" | "last", from?: number, predicate?: (ticket) => boolean) => E | undefinedSeek for a ticket based on direction and optional predicate
on
<K extends Extensible<RegistryEventName>>(event: K, cb: RegistryEventCallback<E, K>) => voidListen for registry events
off
<K extends Extensible<RegistryEventName>>(event: K, cb: RegistryEventCallback<E, K>) => voidStop listening for registry events
emit
<K extends Extensible<RegistryEventName>>(event: K, data: EventPayload<E, K>) => voidEmit an event with data
offboard
(ids: ID[]) => Partial<Z>[]Offboard multiple tickets at once, returning the input shapes that were removed.
batch
<R>(fn: () => R) => RExecute operations in a batch, deferring cache invalidation and event emission until complete