Notifications
Notifications. bridge.notifications uses ox_lib-shaped notification tables.
bridge.notifications uses ox_lib-shaped notification tables.
Auto-detect order: ox_lib → vms_notifyv2 → codem-notification → brutal_notify → fl-notify → mythic_notify → okokNotify → pnotify → solaire_notify → t-notify → lation_ui → wasabi_notify → ZSX_UIV2. Fallback is internal.
-- Client
bridge.notifications.notify({
description = 'Item used',
type = 'success',
})
-- Server
bridge.notifications.notify(source, {
description = 'Welcome back',
type = 'inform',
})Built-in notifications
When no supported notification resource is installed, the bridge falls back to internal, its own notification UI. It needs nothing else installed, and you can pin it with Config.Notifications = "internal".
- Types:
success,inform,warninganderroreach get their own icon colour and duration bar from the shadcn palette. - Markdown:
titleanddescriptionsupport markdown, so**$1,250**shows in bold. - Images: set
imageto an image URL and it replaces the icon. An item image from your inventory works, for examplenui://ox_inventory/web/images/burger.png. If the image fails to load, the type icon is shown instead. - Icons:
icontakes a Font Awesome icon name such asgas-pump.iconColorandiconAnimationchange its look. - Position and stacking: all eight
positionvalues work. Up to five notifications show at once, and the oldest is dropped when a sixth arrives.
bridge.notifications.notify({
type = 'success',
title = 'Item received',
description = '2x **Burger**',
image = 'nui://ox_inventory/web/images/burger.png',
})Types
OxNotification
| Field | Type |
|---|---|
id | string? |
title | string? |
description | string? |
duration | number? default 3000 |
showDuration | boolean? |
position | 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left' | 'center-right' | 'center-left' |
type | 'inform' | 'error' | 'success' | 'warning' |
style | table? |
icon | string? |
iconColor | string? |
iconAnimation | 'spin' | 'spinPulse' | 'spinReverse' | 'pulse' | 'beat' | 'fade' | 'beatFade' | 'bounce' | 'shake' |
alignIcon | 'top' | 'center' |
sound | table? |
