API
Use Lua exports with a colon: exports['elvisuals_notify']:notify(data). The dot form does not pass
arguments correctly.
Client notifications
Transient toast
exports['elvisuals_notify']:notify({
type = 'success', -- info | success | warning | error
title = 'Payment received',
description = 'You were paid **$1,250**.',
duration = 3500,
})Transient notifications close automatically. If duration is omitted, the configured duration for
the selected type is used.
Persistent toast
A persistent notification needs a stable id. Send the same ID again to update it, and hide it when
the status ends:
exports['elvisuals_notify']:notify({
id = 'wanted',
persistent = true,
type = 'error',
title = 'Wanted',
description = 'The police are looking for you.',
})
exports['elvisuals_notify']:hide('wanted')notify returns the supplied ID, which can be stored for a later call to hide.
Panel, checklist, and progress
Panels are persistent and can display checklist items and measured progress:
local steps = {
{ label = 'Pick up the package', state = 'done' },
{ label = '2 stops completed', state = 'folded' },
{ label = 'Hand it over', state = 'active', hint = 'Vinewood Boulevard' },
{ label = 'Collect the fee', state = 'pending' },
}
exports['elvisuals_notify']:notify({
id = 'delivery',
persistent = true,
variant = 'panel',
type = 'info',
title = 'Delivery',
items = steps,
progress = 68,
progressLabel = '3/4',
})Update the table and send it again with the same ID. progress is clamped from 0 to 100 and changes
only when your script sends a new value.
| Step state | Appearance |
|---|---|
done | Completed step |
active | Current step |
pending | Upcoming step; also the fallback for an unknown state |
folded | Compact summary for collapsed steps |
items, progress, and progressLabel are only rendered by a persistent panel.
Text prompts
exports['elvisuals_notify']:showTextUI('Open door', {
key = 'E',
type = 'info',
position = 'right-center',
})
exports['elvisuals_notify']:hideTextUI()
local isOpen, text = exports['elvisuals_notify']:isTextUIOpen()Available positions are right-center, left-center, top-center, and bottom-center. Options also
accept icon and force.
Repeated calls with identical text are ignored so proximity loops do not restart the animation every
frame. Set force = true when the text is unchanged but another option, such as the key or position,
must be refreshed.
Server exports
Use the player’s server ID as the first argument:
exports['elvisuals_notify']:notify(source, {
type = 'success',
title = 'Paid',
})
exports['elvisuals_notify']:hide(source, 'delivery')
exports['elvisuals_notify']:broadcast({
type = 'info',
title = 'Restart in 5 minutes',
})The server sends notification payloads to clients; the resource does not expose a client event that can notify other players.
Notification fields
| Field | Type | Notes |
|---|---|---|
type | string | info, success, warning, or error; defaults to info |
title | string | Optional; supports **bold**, *italic*, and \n |
description | string | Optional; supports the same formatting |
id | string or number | Required when persistent = true |
persistent | boolean | Keeps the notification visible until hidden |
variant | string | toast by default; panel requires persistent = true |
duration | number | Milliseconds; transient only, multiplied and clamped by config |
items | table | Checklist entries; panel only |
progress | number | 0–100; panel only |
progressLabel | string | Short label beside panel progress |
icon | string | info, success, warning, error, key, or a 1–3 character glyph |
alignIcon | string | center by default, or top |
showDuration | boolean | Overrides the configured duration bar for this transient toast |
sound | boolean | Set to false to silence this call |
At least one of title, description, or a valid items table is required. Invalid calls print a
warning to F8 with the calling resource name. Recoverable values, such as an unknown type, fall back
to a safe default.
Other exports
| Export | Side | Result |
|---|---|---|
:hideNotify(id) | client | Alias of hide |
:hideNotify(playerId, id) | server | Alias of hide |
:clear() | client | Clears notifications, panels, and the text prompt |
:openConfigPanel() | client | Opens the local settings editor |
:legacy(text, type, duration) | client | QBCore/ESX-style argument order with type mapping |