Skip to Content

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 stateAppearance
doneCompleted step
activeCurrent step
pendingUpcoming step; also the fallback for an unknown state
foldedCompact 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

FieldTypeNotes
typestringinfo, success, warning, or error; defaults to info
titlestringOptional; supports **bold**, *italic*, and \n
descriptionstringOptional; supports the same formatting
idstring or numberRequired when persistent = true
persistentbooleanKeeps the notification visible until hidden
variantstringtoast by default; panel requires persistent = true
durationnumberMilliseconds; transient only, multiplied and clamped by config
itemstableChecklist entries; panel only
progressnumber0–100; panel only
progressLabelstringShort label beside panel progress
iconstringinfo, success, warning, error, key, or a 1–3 character glyph
alignIconstringcenter by default, or top
showDurationbooleanOverrides the configured duration bar for this transient toast
soundbooleanSet 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

ExportSideResult
:hideNotify(id)clientAlias of hide
:hideNotify(playerId, id)serverAlias of hide
:clear()clientClears notifications, panels, and the text prompt
:openConfigPanel()clientOpens the local settings editor
:legacy(text, type, duration)clientQBCore/ESX-style argument order with type mapping