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)
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | ✅ | Notification type: success, error, warning, info |
message | string | ✅ | The notification message body |
duration | number | ✅ | How long the notification stays visible in milliseconds |
title | string | ❌ | Optional 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"
)