Skip to main content

Quick Start

exports.lation_ui:notify({
    title = 'Success',
    message = 'Profile updated successfully',
    type = 'success'
})

Functions

Display a notification to the player.
exports.lation_ui:notify(data)
Parameters:
  • data (table) - Notification configuration object (see Options)

Configuration

Options

id
string
Unique identifier - when provided will only show once when spammed or update the same notification
title
string
Notification title (supports markdown)
Either title or message is required
message
string
Notification message (supports markdown)
Either title or message is required. Can also use description as an alias
type
string
default:"info"
Notification typeAvailable options: 'info', 'success', 'warning', 'error'
duration
number
default:"5000"
Duration in milliseconds
position
string
default:"top-right"
Notification positionAvailable options: 'top-left', 'top', 'top-right', 'center-left', 'center-right', 'bottom-left', 'bottom', 'bottom-right'
'top' is an alias for 'top-center'
icon
string
FontAwesome icon class
iconColor
string
Icon color (hex or CSS color name)
Automatically determined by notification type if not specified
iconAnimation
string
Icon animation typeAvailable options: 'spin', 'spinPulse', 'spinReverse', 'pulse', 'beat', 'fade', 'beatFade', 'bounce', 'shake'
bgColor
string
Background color (hex or CSS color name)
Automatically determined by notification type if not specified
txtColor
string
Text color (hex or CSS color name)
Automatically determined by notification type if not specified
titleColor
string
Title text color (hex or CSS color name)
Automatically determined by notification type if not specified
sound
table
Sound configuration (see Sound Options)

Sound Options

bank
string
Name of audio bank that contains the soundset
set
string
required
Soundset the soundname is a member of
name
string
required
Sound name to play

Server-Side Usage

To send notifications from the server, use the client event:
TriggerClientEvent('lation_ui:notify', source, data)
Parameters:
  • source (number) - The player’s server ID
  • data (table) - Notification data table (see Options)
Example:
TriggerClientEvent('lation_ui:notify', source, {
    title = 'Server Message',
    message = 'You received a reward',
    type = 'success'
})

Preview

Notification Preview