Skip to main content

Client Usage

v_notify is used via exports on the client side. The export accepts 4 parameters.

Syntax

exports['v_notify']:notify(type, message, duration, title)
ParameterTypeRequiredDescription
typestringNotification type: success, error, warning, info
messagestringThe notification message body
durationnumberHow long the notification stays visible in milliseconds
titlestringOptional custom title. Defaults to the type name if omitted

Examples

Success

exports['v_notify']:notify(
"success",
"This is a notification!",
4000,
"Success Title"
)

Error

exports['v_notify']:notify(
"error",
"Something went wrong!",
5000,
"Error"
)

Warning

exports['v_notify']:notify(
"warning",
"This is a warning message!",
4000,
"Warning"
)

Info

exports['v_notify']:notify(
"info",
"Here is some information.",
4000,
"Information"
)